Skip to content

Commit 4a103de

Browse files
committed
Makes test more general
1 parent 7a41f6a commit 4a103de

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/factory/SpringCloudCircuitBreakerFilterFactoryTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.springframework.cloud.gateway.test.BaseWebClientTests;
2323
import org.springframework.http.HttpStatus;
2424

25+
import static org.assertj.core.api.Assertions.assertThat;
2526
import static org.springframework.http.MediaType.APPLICATION_JSON;
2627

2728
/**
@@ -154,11 +155,11 @@ public void filterErrorPage() {
154155
.is5xxServerError()
155156
.expectBody()
156157
.jsonPath("$.status")
157-
.isEqualTo(504)
158+
.value(status -> assertThat(HttpStatus.valueOf((Integer) status).is5xxServerError()).isTrue())
158159
.jsonPath("$.message")
159160
.isNotEmpty()
160161
.jsonPath("$.error")
161-
.isEqualTo("Gateway Timeout");
162+
.isNotEmpty();
162163
}
163164

164165
@Test

0 commit comments

Comments
 (0)