mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
Stabilize Guardian WebSocket tests (#41191)
## Why Guardian tests could continue after a WebSocket handshake but before the connection entered the idle pool. The shared request waiter could also miss a notification delivered between checking the request log and registering its wait. ## What changed - Wait for Guardian prewarming to populate the idle connection pool instead of treating completed handshakes as sufficient. - Use two initial Guardian connections in tests while retaining eight in non-test builds. - Register for request-log notifications before inspecting the log to avoid a lost wakeup. GitOrigin-RevId: 88f6a22c5401e03c24e6e114f2563fc641bfef80
This commit is contained in:
1 parent
efc020d224
commit
8935ff19db
4 files changed
+45
-27
No files matched your search
@@ -604,6 +604,7 @@ impl WebSocketTestServer {
|
||||
request_index: usize,
|
||||
) -> WebSocketRequest {
|
||||
loop {
|
||||
let notified = self.request_log_updated.notified();
|
||||
if let Some(request) = self
|
||||
.connections
|
||||
.lock()
|
||||
@@ -614,7 +615,7 @@ impl WebSocketTestServer {
|
||||
{
|
||||
return request;
|
||||
}
|
||||
self.request_log_updated.notified().await;
|
||||
notified.await;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user