Skip to content

Commit 73edf08

Browse files
Isolate model-specific Rust E2E tests
Keep model-catalog-dependent tests on dedicated clients, correct provider group teardown accounting, and discard shared connection state after any failed test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 53a71c6 commit 73edf08

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

rust/tests/e2e/multi_provider_registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,4 +240,4 @@ async fn should_route_delta_turbo_turn_to_its_provider_and_wire_model() {
240240
)
241241
.await;
242242
}
243-
static E2E: super::support::SharedE2eGroup = super::support::SharedE2eGroup::standard(CATEGORY, 2);
243+
static E2E: super::support::SharedE2eGroup = super::support::SharedE2eGroup::standard(CATEGORY, 4);

rust/tests/e2e/rpc_session_state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async fn should_call_session_rpc_model_getcurrent() {
5454

5555
#[tokio::test]
5656
async fn should_call_session_rpc_model_switchto() {
57-
super::support::with_shared_e2e_context(
57+
super::support::with_dedicated_group_e2e_context(
5858
&E2E,
5959
"rpc_session_state",
6060
"should_call_session_rpc_model_switchto",
@@ -1207,4 +1207,4 @@ fn assistant_message_content_if_present(
12071207
}
12081208
}
12091209
static E2E: super::support::SharedE2eGroup =
1210-
super::support::SharedE2eGroup::standard("rpc_session_state", 23);
1210+
super::support::SharedE2eGroup::standard("rpc_session_state", 22);

rust/tests/e2e/session.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ async fn should_set_model_on_existing_session() {
10021002

10031003
#[tokio::test]
10041004
async fn should_set_model_with_reasoningeffort() {
1005-
super::support::with_shared_e2e_context(
1005+
super::support::with_dedicated_group_e2e_context(
10061006
&E2E,
10071007
"session",
10081008
"should_set_model_with_reasoningeffort",
@@ -1752,4 +1752,4 @@ fn secret_number_tool() -> Tool {
17521752
.with_handler(Arc::new(SecretNumberTool))
17531753
}
17541754
static E2E: super::support::SharedE2eGroup =
1755-
super::support::SharedE2eGroup::standard("session", 31);
1755+
super::support::SharedE2eGroup::standard("session", 30);

rust/tests/e2e/support.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,10 @@ pub async fn with_shared_e2e_context<F>(
223223
(result, cleanup_result)
224224
};
225225

226+
let test_succeeded = matches!(&result, Ok(Ok(Ok(()))));
226227
let completed = group.completed_invocations.fetch_add(1, Ordering::Relaxed) + 1;
227-
let teardown_result = if cleanup_result.is_err()
228+
let teardown_result = if !test_succeeded
229+
|| cleanup_result.is_err()
228230
|| is_filtered_test_run()
229231
|| completed == group.expected_invocations
230232
{

0 commit comments

Comments
 (0)