diff --git a/.github/workflows/compatibility.yml b/.github/workflows/compatibility.yml index b34c5d7535..fa6245b01d 100644 --- a/.github/workflows/compatibility.yml +++ b/.github/workflows/compatibility.yml @@ -448,6 +448,7 @@ jobs: - name: Upload test results if: always() && steps.tests.outcome != 'skipped' + timeout-minutes: 2 uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: compat-results-${{ matrix.arch }}-${{ matrix.test }} diff --git a/src/test/java/io/github/hectorvent/floci/core/common/docker/DockerClientProducerTest.java b/src/test/java/io/github/hectorvent/floci/core/common/docker/DockerClientProducerTest.java index f2b3f6de2f..0408aed8b4 100644 --- a/src/test/java/io/github/hectorvent/floci/core/common/docker/DockerClientProducerTest.java +++ b/src/test/java/io/github/hectorvent/floci/core/common/docker/DockerClientProducerTest.java @@ -736,10 +736,13 @@ class DockerClientProducerTest { }); } - assertNotNull(accepted.poll(10, TimeUnit.SECONDS), "first stream should connect"); - assertNotNull(accepted.poll(10, TimeUnit.SECONDS), "second stream should connect"); - assertNull(accepted.poll(1, TimeUnit.SECONDS), - "third stream should wait for a pooled connection instead of opening one"); + try (Socket first = accepted.poll(10, TimeUnit.SECONDS); + Socket second = accepted.poll(10, TimeUnit.SECONDS); + Socket third = accepted.poll(1, TimeUnit.SECONDS)) { + assertNotNull(first, "first stream should connect"); + assertNotNull(second, "second stream should connect"); + assertNull(third, "third stream should wait for a pooled connection instead of opening one"); + } } finally { client.close(); for (Socket socket : accepted) {