Skip to content

Commit

Permalink
TestCI bugfix investigation
Browse files Browse the repository at this point in the history
  • Loading branch information
andsel committed Dec 15, 2023
1 parent 06d6119 commit 4105df5
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/temp_maven_build_debug.yml
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -279,6 +280,8 @@ public void givenSharedSubscriptionWithCertainQoSWhenSameClientWithSameShareSubs
// because the PUB is at QoS1 and the subscription is at QoS0, the subscribed doesn't receive any message
verifyNoPublish(subscriberClient,Duration.ofSeconds(1), "No message is expected at Qos0 subscription");

LOG.info("Before repeating with AT_LEAST_ONCE");

// update QoS for shared subscription
subscribe(subscriberClient, "$share/collectors/metric/temperature/living", MqttQos.AT_LEAST_ONCE);

Expand Down
2 changes: 1 addition & 1 deletion broker/src/test/resources/log4j.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#log4j.rootLogger=ERROR, stdout, file
log4j.rootLogger=ERROR, stdout

log4j.logger.io.moquette=WARN
log4j.logger.io.moquette=DEBUG
#log4j.logger.io.moquette.broker=DEBUG
#log4j.logger.io.moquette.broker.MQTTConnection=DEBUG
#log4j.logger.io.moquette.broker.SessionRegistry=DEBUG
Expand Down

0 comments on commit 4105df5

Please sign in to comment.