Browse Source

Trys to make test more robust

pull/1478/head
Spencer Gibb 5 years ago
parent
commit
b947fd3f70
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 3
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/HystrixGatewayFilterFactoryTests.java

3
spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/HystrixGatewayFilterFactoryTests.java

@ -19,6 +19,7 @@ package org.springframework.cloud.gateway.filter.factory; @@ -19,6 +19,7 @@ package org.springframework.cloud.gateway.filter.factory;
import com.netflix.config.ConfigurationManager;
import com.netflix.hystrix.Hystrix;
import com.netflix.hystrix.metric.consumer.HealthCountsStream;
import org.hamcrest.Matchers;
import org.junit.Test;
import org.junit.runner.RunWith;
@ -125,7 +126,7 @@ public class HystrixGatewayFilterFactoryTests extends BaseWebClientTests { @@ -125,7 +126,7 @@ public class HystrixGatewayFilterFactoryTests extends BaseWebClientTests {
public void hystrixFilterErrorPage() {
testClient.get().uri("/delay/3").header("Host", "www.hystrixconnectfail.org")
.accept(APPLICATION_JSON).exchange().expectStatus().is5xxServerError()
.expectBody().jsonPath("$.status").isEqualTo(500).jsonPath("$.message")
.expectBody().jsonPath("$.status").value(Matchers.greaterThanOrEqualTo(500)).jsonPath("$.message")
.isNotEmpty().jsonPath("$.error").isEqualTo("Internal Server Error");
}

Loading…
Cancel
Save