diff --git a/.github/workflows/temp_maven_build_debug.yml b/.github/workflows/temp_maven_build_debug.yml new file mode 100644 index 000000000..987e1587c --- /dev/null +++ b/.github/workflows/temp_maven_build_debug.yml @@ -0,0 +1,26 @@ +# This workflow is copied from maven_build.yml and is temporarily used to throubleshoot failure that appears only in CI + +name: Java CI with Maven + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + name: Temp test of CI + steps: + - name: Check out repository + uses: actions/checkout@v2 + + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 17 + architecture: x64 + - name: Test with Maven + run: ./mvnw -Dtest="SharedSubscriptionTest#givenSharedSubscriptionWithCertainQoSWhenSameClientWithSameShareSubscribeToSameTopicFilterThenQoSUpdates" test -pl broker --file pom.xml + diff --git a/broker/src/test/java/io/moquette/integration/mqtt5/SharedSubscriptionTest.java b/broker/src/test/java/io/moquette/integration/mqtt5/SharedSubscriptionTest.java index 95898dac5..f4f70fab4 100644 --- a/broker/src/test/java/io/moquette/integration/mqtt5/SharedSubscriptionTest.java +++ b/broker/src/test/java/io/moquette/integration/mqtt5/SharedSubscriptionTest.java @@ -193,6 +193,7 @@ private static void verifyPubPayload(MqttMessage received, String expectedPayloa MqttPublishMessage pub = (MqttPublishMessage) received; String payload = pub.payload().asByteBuf().toString(StandardCharsets.UTF_8); assertEquals(expectedPayload, payload); + assertTrue(pub.release(), "received message must be deallocated"); } @NotNull