The mentioned bug randomly occurred after some subsequent patches, so the sleep should happen before GetOverlappedResult is called.
Signed-off-by: Julian Klemann jklemann@codeweavers.com --- dlls/httpapi/tests/httpapi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/httpapi/tests/httpapi.c b/dlls/httpapi/tests/httpapi.c index be1d31c12ad..9d344f26d02 100644 --- a/dlls/httpapi/tests/httpapi.c +++ b/dlls/httpapi/tests/httpapi.c @@ -228,10 +228,6 @@ static void test_v1_server(void) ret = send(s, req_text, strlen(req_text), 0); ok(ret == strlen(req_text), "send() returned %d.\n", ret);
- ret = GetOverlappedResult(queue, &ovl, &ret_size, TRUE); - ok(ret, "Got error %lu.\n", GetLastError()); - ok(ret_size > sizeof(*req), "Got size %lu.\n", ret_size); - /* Various versions of Windows (observed on 64-bit Windows 8 and Windows 10 * version 1507, but probably affecting others) suffer from a bug where the * kernel will report success before completely filling the buffer or @@ -239,6 +235,10 @@ static void test_v1_server(void) * around this. */ Sleep(100);
+ ret = GetOverlappedResult(queue, &ovl, &ret_size, TRUE); + ok(ret, "Got error %lu.\n", GetLastError()); + ok(ret_size > sizeof(*req), "Got size %lu.\n", ret_size); + ok(!req->Flags, "Got flags %#lx.\n", req->Flags); ok(req->ConnectionId, "Expected nonzero connection ID.\n"); ok(req->RequestId, "Expected nonzero connection ID.\n");