Skip to content

Commit

Permalink
Fix failing tests in master
Browse files Browse the repository at this point in the history
  • Loading branch information
kenfinnigan committed Nov 12, 2019
1 parent b245147 commit 24876d0
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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)
Expand Down

0 comments on commit 24876d0

Please sign in to comment.