From 7280e9801c6f19c30bdeeb06613a7ada36b36968 Mon Sep 17 00:00:00 2001 From: MMaiero Date: Mon, 2 Oct 2023 17:57:17 +0200 Subject: [PATCH] feat: Birth messages now default to Qos 1 Signed-off-by: MMaiero --- .../java/org/eclipse/kura/core/cloud/CloudServiceOptions.java | 2 +- .../java/org/eclipse/kura/core/cloud/BirthMessagesTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kura/org.eclipse.kura.core.cloud/src/main/java/org/eclipse/kura/core/cloud/CloudServiceOptions.java b/kura/org.eclipse.kura.core.cloud/src/main/java/org/eclipse/kura/core/cloud/CloudServiceOptions.java index 95f9626e4e9..365bda63b1b 100644 --- a/kura/org.eclipse.kura.core.cloud/src/main/java/org/eclipse/kura/core/cloud/CloudServiceOptions.java +++ b/kura/org.eclipse.kura.core.cloud/src/main/java/org/eclipse/kura/core/cloud/CloudServiceOptions.java @@ -42,7 +42,7 @@ public class CloudServiceOptions { private static final String ENABLE_DFLT_SUBSCRIPTIONS = "enable.default.subscriptions"; private static final String PAYLOAD_ENCODING = "payload.encoding"; - private static final int LIFECYCLE_QOS = 0; + private static final int LIFECYCLE_QOS = 1; private static final int LIFECYCLE_PRIORITY = 0; private static final boolean LIFECYCLE_RETAIN = false; diff --git a/kura/test/org.eclipse.kura.core.cloud.test/src/test/java/org/eclipse/kura/core/cloud/BirthMessagesTest.java b/kura/test/org.eclipse.kura.core.cloud.test/src/test/java/org/eclipse/kura/core/cloud/BirthMessagesTest.java index 9e420278f41..bce771c72f9 100644 --- a/kura/test/org.eclipse.kura.core.cloud.test/src/test/java/org/eclipse/kura/core/cloud/BirthMessagesTest.java +++ b/kura/test/org.eclipse.kura.core.cloud.test/src/test/java/org/eclipse/kura/core/cloud/BirthMessagesTest.java @@ -394,12 +394,12 @@ private void thenNoBirthIsPublished() throws KuraStoreException { private void thenBirthIsPublishedAfter(long delayMillis, String expectedTopic) throws KuraException { verify(this.dataService, after(delayMillis).never()).publish(eq(expectedTopic), any(), eq(0), eq(false), eq(0)); - verify(this.dataService, after(delayMillis + SLACK_DELAY).times(1)).publish(eq(expectedTopic), any(), eq(0), + verify(this.dataService, after(delayMillis + SLACK_DELAY).times(1)).publish(eq(expectedTopic), any(), eq(1), eq(false), eq(0)); } private void thenBirthIsPublishedImmediately(String expectedTopic) throws KuraException { - verify(this.dataService, timeout(SLACK_DELAY).times(1)).publish(eq(expectedTopic), any(), eq(0), eq(false), + verify(this.dataService, timeout(SLACK_DELAY).times(1)).publish(eq(expectedTopic), any(), eq(1), eq(false), eq(0)); }