diff --git a/extensions/resteasy/deployment/src/test/java/io/quarkus/resteasy/test/NotFoundExceptionMapperTestCase.java b/extensions/resteasy/deployment/src/test/java/io/quarkus/resteasy/test/NotFoundExceptionMapperTestCase.java index 36d124964861e..76a3f583385c7 100644 --- a/extensions/resteasy/deployment/src/test/java/io/quarkus/resteasy/test/NotFoundExceptionMapperTestCase.java +++ b/extensions/resteasy/deployment/src/test/java/io/quarkus/resteasy/test/NotFoundExceptionMapperTestCase.java @@ -54,15 +54,19 @@ public void testJsonResourceNotFound() { } @Test - public void shouldDisplayNewAddedFileIn404ErrorPage() { + public void shouldDisplayNewAddedFileIn404ErrorPage() throws InterruptedException { String CONTENT = "html content"; test.addResourceFile(META_INF_RESOURCES + "index2.html", CONTENT); + Thread.sleep(700); + RestAssured.get("/index2.html") .then() .statusCode(200) .body(containsString(CONTENT)); // check that index2.html is live reloaded + Thread.sleep(500); + RestAssured.given() .accept(ContentType.HTML) .when() @@ -73,10 +77,12 @@ public void shouldDisplayNewAddedFileIn404ErrorPage() { } @Test - public void shouldNotDisplayDeletedFileIn404ErrorPage() { + public void shouldNotDisplayDeletedFileIn404ErrorPage() throws InterruptedException { String TEST_CONTENT = "test html content"; test.addResourceFile(META_INF_RESOURCES + "test.html", TEST_CONTENT); + Thread.sleep(700); + RestAssured .get("/test.html") .then() @@ -85,6 +91,8 @@ public void shouldNotDisplayDeletedFileIn404ErrorPage() { test.deleteResourceFile(META_INF_RESOURCES + "test.html"); // delete test.html file + Thread.sleep(700); + RestAssured .given() .accept(ContentType.HTML)