diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9906229681..e3f0a7ffde 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - module: [core, servlet, websockets-jsr] + module: [core] jdk: [11, 17, 21] openjdk_impl: [ temurin ] steps: @@ -104,7 +104,7 @@ jobs: - name: Print Version run: mvn -v - name: Run Tests - run: mvn -U -B -fae test -Pproxy '-DfailIfNoTests=false' -pl ${{ matrix.module }} + run: mvn -U -B -fae test -Dtest=PushResourceRSTTestCase '-DfailIfNoTests=false' -pl ${{ matrix.module }} - uses: actions/upload-artifact@v4 if: failure() with: @@ -120,8 +120,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - module: [core, servlet, websockets-jsr] - proxy: ['-Pproxy', ''] + module: [core] + proxy: [''] jdk: [11] steps: - name: Update hosts - linux @@ -156,7 +156,7 @@ jobs: - name: Print Version run: mvn -v - name: Run Tests - run: mvn -U -B -fae test ${{ matrix.proxy }} '-DfailIfNoTests=false' -pl ${{ matrix.module }} -Dtest.ipv6=true + run: mvn -U -B -fae test ${{ matrix.proxy }} '-Dtest=PushResourceRSTTestCase' '-DfailIfNoTests=false' -pl ${{ matrix.module }} -Dtest.ipv6=true - uses: actions/upload-artifact@v4 if: failure() with: diff --git a/core/src/test/java/io/undertow/protocols/http2/PushResourceRSTTestCase.java b/core/src/test/java/io/undertow/protocols/http2/PushResourceRSTTestCase.java index 1929103f97..ccb3335fdd 100644 --- a/core/src/test/java/io/undertow/protocols/http2/PushResourceRSTTestCase.java +++ b/core/src/test/java/io/undertow/protocols/http2/PushResourceRSTTestCase.java @@ -32,6 +32,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; +import org.jboss.logging.Logger; import org.junit.AfterClass; import org.junit.Assert; import org.junit.Assume; @@ -90,6 +91,7 @@ @ProxyIgnore @AjpIgnore public class PushResourceRSTTestCase { + private static final Logger log = Logger.getLogger(PushResourceRSTTestCase.class); private static final String PUSHER = "/pusher"; private static final String PUSHER_MSG; private static final String TRIGGER = "/trigger"; @@ -240,18 +242,30 @@ private ClientCallback createClientCallback(final List() { @Override - public void completed(ClientExchange result) { + public void completed(final ClientExchange result) { result.setPushHandler(new PushCallback() { @Override public boolean handlePush(ClientExchange originalRequest, ClientExchange pushedRequest) { pushRstCount.incrementAndGet(); + log.debugf("Handling push %d", pushRstCount.get()); latch.countDown(); + setUpResponseListenerAndShutdownWrites(result); return false; } }); + } + @Override + public void failed(IOException e) { + e.printStackTrace(); + exception = e; + latch.countDown(); + } + + private void setUpResponseListenerAndShutdownWrites(ClientExchange result) { result.setResponseListener(new ClientCallback<>() { @Override public void completed(final ClientExchange result) { + log.debugf("Got result %s", result); responses.add(result.getResponse()); new StringReadChannelListener(result.getConnection().getBufferPool()) { @@ -290,13 +304,6 @@ public void failed(IOException e) { latch.countDown(); } } - - @Override - public void failed(IOException e) { - e.printStackTrace(); - exception = e; - latch.countDown(); - } }; } }