#11655 use awaitility to assert as the queue could be updated after the response was received by the client
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
dc0cd2d45f
commit
940c7440b4
|
@ -37,6 +37,7 @@ import org.junit.jupiter.api.Test;
|
|||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvSource;
|
||||
|
||||
import static org.awaitility.Awaitility.await;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.contains;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
|
@ -112,7 +113,7 @@ public class RequestListenersTest
|
|||
"""));
|
||||
|
||||
assertEquals(HttpStatus.OK_200, response.getStatus());
|
||||
assertThat(history, contains("zero", "one", "two", "three", "four"));
|
||||
await().atMost(5, TimeUnit.SECONDS).until(() -> history, contains("zero", "one", "two", "three", "four"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue