Makes test more general
This commit is contained in:
@@ -22,6 +22,7 @@ import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;
|
||||
import org.springframework.cloud.gateway.test.BaseWebClientTests;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON;
|
||||
|
||||
/**
|
||||
@@ -154,11 +155,11 @@ public abstract class SpringCloudCircuitBreakerFilterFactoryTests extends BaseWe
|
||||
.is5xxServerError()
|
||||
.expectBody()
|
||||
.jsonPath("$.status")
|
||||
.isEqualTo(504)
|
||||
.value(status -> assertThat(HttpStatus.valueOf((Integer) status).is5xxServerError()).isTrue())
|
||||
.jsonPath("$.message")
|
||||
.isNotEmpty()
|
||||
.jsonPath("$.error")
|
||||
.isEqualTo("Gateway Timeout");
|
||||
.isNotEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user