Skip to content

Commit

Permalink
test: improve reliability of concurrently run tests
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Dec 18, 2024
1 parent 19927d0 commit b2e9fff
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 103 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ jobs:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Build Project
#run: make install MAVEN_ARGS="${MAVEN_ARGS}"
run: mvn ${MAVEN_ARGS} install
run: make install MAVEN_ARGS="${MAVEN_ARGS}"

- name: Check java-generator CLI
run: |
Expand Down
26 changes: 0 additions & 26 deletions httpclient-jdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,32 +86,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- We cleanup system properties an env vars, so that we can test in a predictable env -->
<environmentVariables>
<KUBERNETES_MASTER />
<KUBERNETES_API_VERSION />
<KUBERNETES_TRUST_CERTIFICATES />
<KUBERNETES_CERTS_CA_FILE />
<KUBERNETES_CERTS_CA_DATA />
<KUBERNETES_CERTS_CLIENT_FILE />
<KUBERNETES_CERTS_CLIENT_DATA />
<KUBERNETES_CERTS_CLIENT_KEY_FILE />
<KUBERNETES_CERTS_CLIENT_KEY_DATA />
<KUBERNETES_CERTS_CLIENT_KEY_ALGO />
<KUBERNETES_CERTS_CLIENT_KEY_PASSPHRASE />
<KUBERNETES_AUTH_BASIC_USERNAME />
<KUBERNETES_AUTH_BASIC_PASSWORD />
<KUBERNETES_AUTH_TRYKUBECONFIG />
<KUBERNETES_AUTH_TRYSERVICEACCOUNT />
<KUBERNETES_AUTH_TOKEN />
<KUBERNETES_WATCH_RECONNECTINTERVAL />
<KUBERNETES_WATCH_RECONNECTLIMIT />
<KUBERNETES_REQUEST_TIMEOUT />
<KUBERNETES_NAMESPACE />
<KUBERNETES_TLS_VERSIONS>TLSv1.2,TLSv1.1,TLSv1</KUBERNETES_TLS_VERSIONS>
</environmentVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down
26 changes: 0 additions & 26 deletions httpclient-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,32 +100,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- We cleanup system properties an env vars, so that we can test in a predictable env -->
<environmentVariables>
<KUBERNETES_MASTER />
<KUBERNETES_API_VERSION />
<KUBERNETES_TRUST_CERTIFICATES />
<KUBERNETES_CERTS_CA_FILE />
<KUBERNETES_CERTS_CA_DATA />
<KUBERNETES_CERTS_CLIENT_FILE />
<KUBERNETES_CERTS_CLIENT_DATA />
<KUBERNETES_CERTS_CLIENT_KEY_FILE />
<KUBERNETES_CERTS_CLIENT_KEY_DATA />
<KUBERNETES_CERTS_CLIENT_KEY_ALGO />
<KUBERNETES_CERTS_CLIENT_KEY_PASSPHRASE />
<KUBERNETES_AUTH_BASIC_USERNAME />
<KUBERNETES_AUTH_BASIC_PASSWORD />
<KUBERNETES_AUTH_TRYKUBECONFIG />
<KUBERNETES_AUTH_TRYSERVICEACCOUNT />
<KUBERNETES_AUTH_TOKEN />
<KUBERNETES_WATCH_RECONNECTINTERVAL />
<KUBERNETES_WATCH_RECONNECTLIMIT />
<KUBERNETES_REQUEST_TIMEOUT />
<KUBERNETES_NAMESPACE />
<KUBERNETES_TLS_VERSIONS>TLSv1.2,TLSv1.1,TLSv1</KUBERNETES_TLS_VERSIONS>
</environmentVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down
25 changes: 1 addition & 24 deletions httpclient-okhttp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,30 +101,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- We cleanup system properties an env vars, so that we can test in a predictable env -->
<environmentVariables>
<KUBERNETES_MASTER />
<KUBERNETES_API_VERSION />
<KUBERNETES_TRUST_CERTIFICATES />
<KUBERNETES_CERTS_CA_FILE />
<KUBERNETES_CERTS_CA_DATA />
<KUBERNETES_CERTS_CLIENT_FILE />
<KUBERNETES_CERTS_CLIENT_DATA />
<KUBERNETES_CERTS_CLIENT_KEY_FILE />
<KUBERNETES_CERTS_CLIENT_KEY_DATA />
<KUBERNETES_CERTS_CLIENT_KEY_ALGO />
<KUBERNETES_CERTS_CLIENT_KEY_PASSPHRASE />
<KUBERNETES_AUTH_BASIC_USERNAME />
<KUBERNETES_AUTH_BASIC_PASSWORD />
<KUBERNETES_AUTH_TRYKUBECONFIG />
<KUBERNETES_AUTH_TRYSERVICEACCOUNT />
<KUBERNETES_AUTH_TOKEN />
<KUBERNETES_WATCH_RECONNECTINTERVAL />
<KUBERNETES_WATCH_RECONNECTLIMIT />
<KUBERNETES_REQUEST_TIMEOUT />
<KUBERNETES_NAMESPACE />
<KUBERNETES_TLS_VERSIONS>TLSv1.2,TLSv1.1,TLSv1</KUBERNETES_TLS_VERSIONS>
</environmentVariables>
<rerunFailingTestsCount>1</rerunFailingTestsCount>
</configuration>
</plugin>
<plugin>
Expand Down
25 changes: 1 addition & 24 deletions httpclient-vertx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,30 +106,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- We cleanup system properties an env vars, so that we can test in a predictable env -->
<environmentVariables>
<KUBERNETES_MASTER />
<KUBERNETES_API_VERSION />
<KUBERNETES_TRUST_CERTIFICATES />
<KUBERNETES_CERTS_CA_FILE />
<KUBERNETES_CERTS_CA_DATA />
<KUBERNETES_CERTS_CLIENT_FILE />
<KUBERNETES_CERTS_CLIENT_DATA />
<KUBERNETES_CERTS_CLIENT_KEY_FILE />
<KUBERNETES_CERTS_CLIENT_KEY_DATA />
<KUBERNETES_CERTS_CLIENT_KEY_ALGO />
<KUBERNETES_CERTS_CLIENT_KEY_PASSPHRASE />
<KUBERNETES_AUTH_BASIC_USERNAME />
<KUBERNETES_AUTH_BASIC_PASSWORD />
<KUBERNETES_AUTH_TRYKUBECONFIG />
<KUBERNETES_AUTH_TRYSERVICEACCOUNT />
<KUBERNETES_AUTH_TOKEN />
<KUBERNETES_WATCH_RECONNECTINTERVAL />
<KUBERNETES_WATCH_RECONNECTLIMIT />
<KUBERNETES_REQUEST_TIMEOUT />
<KUBERNETES_NAMESPACE />
<KUBERNETES_TLS_VERSIONS>TLSv1.2,TLSv1.1,TLSv1</KUBERNETES_TLS_VERSIONS>
</environmentVariables>
<rerunFailingTestsCount>1</rerunFailingTestsCount>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void http1Connections() throws Exception {
asyncResponses.add(client.consumeBytes(request, (value, asyncBody) -> asyncBody.consume()));
handler.await();
}
CompletableFuture.allOf(asyncResponses.toArray(new CompletableFuture[0])).get(60, TimeUnit.SECONDS);
CompletableFuture.allOf(asyncResponses.toArray(new CompletableFuture[0])).get(70, TimeUnit.SECONDS);
assertThat(asyncResponses)
.hasSize(MAX_HTTP_1_CONNECTIONS)
.extracting(CompletableFuture::join)
Expand Down
1 change: 1 addition & 0 deletions platforms/karaf/itests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>${karaf.itest.skip}</skip>
<parallel>none</parallel>
<systemPropertyVariables>
<features.xml>${project.build.directory}/features.xml</features.xml>
<features.repo>${project.build.directory}/features-repo</features.repo>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,7 @@
<ENV_VAR_EXISTS>value</ENV_VAR_EXISTS>
<ENV_VAR_EXISTS_BOOLEAN>true</ENV_VAR_EXISTS_BOOLEAN>
</environmentVariables>
<parallel>suitesAndClasses</parallel>
</configuration>
</plugin>

Expand Down

0 comments on commit b2e9fff

Please sign in to comment.