Commit 0d4933d
committed
test(e2e): fix flaky model switchto test race condition
The test previously expected `after.modelId` to equal `before.modelId`
after successfully switching to `gpt-4.1`. This only passed due to a
race condition where the `session.model_change` event hadn't yet
propagated to the client before `getCurrent()` was called. On some
environments (like Windows CI), the event arrived faster, causing the
model to correctly update to `gpt-4.1`, which then failed the logically
incorrect assertion.
This commit properly awaits the `session.model_change` event and
asserts that the model successfully changed to `gpt-4.1`.1 parent 867e78c commit 0d4933d
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
0 commit comments