Fixed tests
This commit is contained in:
@@ -31,11 +31,12 @@ class E2eSpec extends Specification {
|
||||
TestRestTemplate testRestTemplate = new TestRestTemplate();
|
||||
|
||||
def 'should work'() {
|
||||
Awaitility.await().atMost(this.timeout, TimeUnit.SECONDS).untilAsserted({
|
||||
ResponseEntity<String> entity = this.testRestTemplate
|
||||
.getForEntity("http://" + this.applicationUrl + "/health", String.class);
|
||||
expect:
|
||||
Awaitility.await().atMost(this.timeout, TimeUnit.SECONDS).untilAsserted({
|
||||
ResponseEntity<String> entity = this.testRestTemplate
|
||||
.getForEntity("http://" + this.applicationUrl + "/health", String.class);
|
||||
|
||||
then(entity.getStatusCode().is2xxSuccessful()).isTrue();
|
||||
})
|
||||
then(entity.getStatusCode().is2xxSuccessful()).isTrue();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,11 +32,12 @@ class SmokeSpec extends Specification {
|
||||
TestRestTemplate testRestTemplate = new TestRestTemplate();
|
||||
|
||||
def 'should work'() {
|
||||
Awaitility.await().atMost(this.timeout, TimeUnit.SECONDS).untilAsserted({
|
||||
ResponseEntity<String> entity = this.testRestTemplate
|
||||
.getForEntity("http://" + this.applicationUrl + "/health", String.class);
|
||||
expect:
|
||||
Awaitility.await().atMost(this.timeout, TimeUnit.SECONDS).untilAsserted({
|
||||
ResponseEntity<String> entity = this.testRestTemplate
|
||||
.getForEntity("http://" + this.applicationUrl + "/health", String.class);
|
||||
|
||||
then(entity.getStatusCode().is2xxSuccessful()).isTrue();
|
||||
})
|
||||
then(entity.getStatusCode().is2xxSuccessful()).isTrue();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user