ceftests: Fix flaky URLRequestTest due to server response timing
In some cases the browser may be closed before the server response is sent.
This commit is contained in:
parent
15caa9858d
commit
f594ca3785
|
@ -124,8 +124,10 @@ class ServerHandler : public CefServerHandler {
|
|||
return;
|
||||
}
|
||||
|
||||
// No response should be sent yet.
|
||||
EXPECT_TRUE(server->IsValidConnection(connection_id));
|
||||
if (!server->IsValidConnection(connection_id)) {
|
||||
// This can occur if the connected browser has already closed.
|
||||
return;
|
||||
}
|
||||
|
||||
const int response_code = response->GetStatus();
|
||||
if (response_code <= 0) {
|
||||
|
|
Loading…
Reference in New Issue