Skip to content

Commit

Permalink
Fixed assertion mismatch between int and long.
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Aug 26, 2024
1 parent 0a56509 commit 0f28d47
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public boolean handle(Request request, Response response, Callback callback)
endPoints.add(endPoint);

assertEquals(maxRequests, callbacks.size());
await().atMost(5, TimeUnit.SECONDS).until(qosHandler::getSuspendedRequestCount, is(1L));
await().atMost(5, TimeUnit.SECONDS).until(qosHandler::getSuspendedRequestCount, is(1));

// Finish and verify the waiting requests.
List<Callback> copy = List.copyOf(callbacks);
Expand All @@ -130,7 +130,7 @@ public boolean handle(Request request, Response response, Callback callback)
}

// The suspended request should have been resumed.
await().atMost(5, TimeUnit.SECONDS).until(qosHandler::getSuspendedRequestCount, is(0L));
await().atMost(5, TimeUnit.SECONDS).until(qosHandler::getSuspendedRequestCount, is(0));
await().atMost(5, TimeUnit.SECONDS).until(callbacks::size, is(1));

// Finish the resumed request that is now waiting.
Expand Down Expand Up @@ -175,11 +175,11 @@ public boolean handle(Request request, Response response, Callback callback)
Host: localhost
""");
await().atMost(5, TimeUnit.SECONDS).until(qosHandler::getSuspendedRequestCount, is(1L));
await().atMost(5, TimeUnit.SECONDS).until(qosHandler::getSuspendedRequestCount, is(1));

// Do not succeed the callback of the first request.
// Wait for the second request to time out.
await().atMost(2 * timeout, TimeUnit.MILLISECONDS).until(qosHandler::getSuspendedRequestCount, is(0L));
await().atMost(2 * timeout, TimeUnit.MILLISECONDS).until(qosHandler::getSuspendedRequestCount, is(0));

String text = endPoint1.getResponse(false, 5, TimeUnit.SECONDS);
HttpTester.Response response = HttpTester.parseResponse(text);
Expand Down

0 comments on commit 0f28d47

Please sign in to comment.