From 180a052c7622a99b9fb37cc34f17f4cc1628e73d Mon Sep 17 00:00:00 2001 From: spencergibb Date: Tue, 7 Feb 2023 12:11:35 -0500 Subject: [PATCH] Moves disabled if github actions to methods --- ...ModifyRequestBodyGatewayFilterFactorySslTimeoutTests.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/factory/rewrite/ModifyRequestBodyGatewayFilterFactorySslTimeoutTests.java b/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/factory/rewrite/ModifyRequestBodyGatewayFilterFactorySslTimeoutTests.java index 85a13786..2cb27a89 100644 --- a/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/factory/rewrite/ModifyRequestBodyGatewayFilterFactorySslTimeoutTests.java +++ b/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/factory/rewrite/ModifyRequestBodyGatewayFilterFactorySslTimeoutTests.java @@ -64,7 +64,6 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen "spring.main.allow-bean-definition-overriding=true" }) @DirtiesContext @ActiveProfiles("single-cert-ssl") -@DisabledIfEnvironmentVariable(named = "GITHUB_ACTION", matches = ".*") class ModifyRequestBodyGatewayFilterFactorySslTimeoutTests extends BaseWebClientTests { @Autowired @@ -73,6 +72,7 @@ class ModifyRequestBodyGatewayFilterFactorySslTimeoutTests extends BaseWebClient @BeforeEach public void setup() { try { + System.err.println("in github = " + System.getenv("GITHUB_ACTIONS")); SslContext sslContext = SslContextBuilder.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE) .build(); HttpClient httpClient = HttpClient.create().secure(ssl -> ssl.sslContext(sslContext)); @@ -84,6 +84,7 @@ class ModifyRequestBodyGatewayFilterFactorySslTimeoutTests extends BaseWebClient } @Test + @DisabledIfEnvironmentVariable(named = "GITHUB_ACTIONS", matches = "true") void modifyRequestBodySSLTimeout() { testClient.post().uri("/post").header("Host", "www.modifyrequestbodyssltimeout.org") .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML_VALUE) @@ -92,6 +93,7 @@ class ModifyRequestBodyGatewayFilterFactorySslTimeoutTests extends BaseWebClient .isEqualTo("handshake timed out after 1ms"); } + @DisabledIfEnvironmentVariable(named = "GITHUB_ACTIONS", matches = "true") @RetryingTest(3) void modifyRequestBodyRelease() { releaseCount.set(0); @@ -109,6 +111,7 @@ class ModifyRequestBodyGatewayFilterFactorySslTimeoutTests extends BaseWebClient } @Test + @DisabledIfEnvironmentVariable(named = "GITHUB_ACTIONS", matches = "true") void modifyRequestBodyHappenedError() { testClient.post().uri("/post").header("Host", "www.modifyrequestbodyexception.org") .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML_VALUE)