diff --git a/smallrye-reactive-messaging-jackson/src/main/java/io/smallrye/reactive/messaging/json/JacksonMapping.java b/smallrye-reactive-messaging-jackson/src/main/java/io/smallrye/reactive/messaging/json/jackson/JacksonMapping.java similarity index 88% rename from smallrye-reactive-messaging-jackson/src/main/java/io/smallrye/reactive/messaging/json/JacksonMapping.java rename to smallrye-reactive-messaging-jackson/src/main/java/io/smallrye/reactive/messaging/json/jackson/JacksonMapping.java index 1f5e4e0865..548ad12e6e 100644 --- a/smallrye-reactive-messaging-jackson/src/main/java/io/smallrye/reactive/messaging/json/JacksonMapping.java +++ b/smallrye-reactive-messaging-jackson/src/main/java/io/smallrye/reactive/messaging/json/jackson/JacksonMapping.java @@ -1,4 +1,4 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jackson; import jakarta.annotation.Priority; import jakarta.enterprise.context.ApplicationScoped; @@ -7,6 +7,8 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import io.smallrye.reactive.messaging.json.JsonMapping; + @ApplicationScoped @Priority(value = JsonMapping.DEFAULT_PRIORITY) public class JacksonMapping implements JsonMapping { diff --git a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/JacksonMappingTest.java b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/JacksonMappingTest.java similarity index 94% rename from smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/JacksonMappingTest.java rename to smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/JacksonMappingTest.java index 6e7dfa265d..2436503cd3 100644 --- a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/JacksonMappingTest.java +++ b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/JacksonMappingTest.java @@ -1,4 +1,4 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jackson; import static org.assertj.core.api.Assertions.assertThat; diff --git a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/JmsConnectorTest.java b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/JmsConnectorTest.java similarity index 95% rename from smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/JmsConnectorTest.java rename to smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/JmsConnectorTest.java index 7115a83f25..6a6bafab1b 100644 --- a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/JmsConnectorTest.java +++ b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/JmsConnectorTest.java @@ -1,4 +1,4 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jackson; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; diff --git a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/ObjectMapperProvider.java b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/ObjectMapperProvider.java similarity index 88% rename from smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/ObjectMapperProvider.java rename to smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/ObjectMapperProvider.java index 7c480a8454..7e18e7a078 100644 --- a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/ObjectMapperProvider.java +++ b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/ObjectMapperProvider.java @@ -1,4 +1,4 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jackson; import jakarta.enterprise.context.ApplicationScoped; import jakarta.enterprise.inject.Produces; diff --git a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/Person.java b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/Person.java similarity index 90% rename from smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/Person.java rename to smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/Person.java index c67da3a6dd..1d4399185a 100644 --- a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/Person.java +++ b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/Person.java @@ -1,4 +1,4 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jackson; public class Person { diff --git a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/PersonConsumerBean.java b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/PersonConsumerBean.java similarity index 90% rename from smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/PersonConsumerBean.java rename to smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/PersonConsumerBean.java index 5e3243bb1c..6a01618eb5 100644 --- a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/PersonConsumerBean.java +++ b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/PersonConsumerBean.java @@ -1,4 +1,4 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jackson; import java.util.ArrayList; import java.util.List; diff --git a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/PersonProducerBean.java b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/PersonProducerBean.java similarity index 91% rename from smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/PersonProducerBean.java rename to smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/PersonProducerBean.java index 3247a24551..78760f8892 100644 --- a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/PersonProducerBean.java +++ b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/PersonProducerBean.java @@ -1,4 +1,4 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jackson; import jakarta.enterprise.context.ApplicationScoped; diff --git a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/TestObject.java b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/TestObject.java similarity index 78% rename from smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/TestObject.java rename to smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/TestObject.java index d8271dff67..1f45599847 100644 --- a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/TestObject.java +++ b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/jackson/TestObject.java @@ -1,7 +1,9 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jackson; import com.fasterxml.jackson.annotation.JsonProperty; +import io.smallrye.reactive.messaging.json.JsonMapping; + /** * Test object to use in {@link JsonMapping} implementation. */ diff --git a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/support/JmsTestBase.java b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/support/JmsTestBase.java index 25d4c74e98..908ef03d4a 100644 --- a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/support/JmsTestBase.java +++ b/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/support/JmsTestBase.java @@ -9,8 +9,8 @@ import io.smallrye.config.SmallRyeConfigProviderResolver; import io.smallrye.config.inject.ConfigExtension; import io.smallrye.reactive.messaging.jms.JmsConnector; -import io.smallrye.reactive.messaging.json.JacksonMapping; -import io.smallrye.reactive.messaging.json.ObjectMapperProvider; +import io.smallrye.reactive.messaging.json.jackson.JacksonMapping; +import io.smallrye.reactive.messaging.json.jackson.ObjectMapperProvider; import io.smallrye.reactive.messaging.providers.MediatorFactory; import io.smallrye.reactive.messaging.providers.connectors.ExecutionHolder; import io.smallrye.reactive.messaging.providers.connectors.WorkerPoolRegistry; diff --git a/smallrye-reactive-messaging-jsonb/src/main/java/io/smallrye/reactive/messaging/json/JsonBMapping.java b/smallrye-reactive-messaging-jsonb/src/main/java/io/smallrye/reactive/messaging/json/jsonb/JsonBMapping.java similarity index 82% rename from smallrye-reactive-messaging-jsonb/src/main/java/io/smallrye/reactive/messaging/json/JsonBMapping.java rename to smallrye-reactive-messaging-jsonb/src/main/java/io/smallrye/reactive/messaging/json/jsonb/JsonBMapping.java index 7b9a7a19ca..602333f8d5 100644 --- a/smallrye-reactive-messaging-jsonb/src/main/java/io/smallrye/reactive/messaging/json/JsonBMapping.java +++ b/smallrye-reactive-messaging-jsonb/src/main/java/io/smallrye/reactive/messaging/json/jsonb/JsonBMapping.java @@ -1,10 +1,12 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jsonb; import jakarta.annotation.Priority; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.json.bind.Jsonb; +import io.smallrye.reactive.messaging.json.JsonMapping; + @ApplicationScoped @Priority(value = JsonMapping.DEFAULT_PRIORITY + 1) public class JsonBMapping implements JsonMapping { diff --git a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/JmsConnectorTest.java b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/JmsConnectorTest.java similarity index 95% rename from smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/JmsConnectorTest.java rename to smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/JmsConnectorTest.java index 7115a83f25..4309bb946c 100644 --- a/smallrye-reactive-messaging-jackson/src/test/java/io/smallrye/reactive/messaging/json/JmsConnectorTest.java +++ b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/JmsConnectorTest.java @@ -1,4 +1,4 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jsonb; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; diff --git a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/JsonBMappingTest.java b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/JsonBMappingTest.java similarity index 94% rename from smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/JsonBMappingTest.java rename to smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/JsonBMappingTest.java index 6b779d2fec..d817585eb4 100644 --- a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/JsonBMappingTest.java +++ b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/JsonBMappingTest.java @@ -1,4 +1,4 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jsonb; import static org.assertj.core.api.Assertions.assertThat; diff --git a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/JsonBProvider.java b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/JsonBProvider.java similarity index 89% rename from smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/JsonBProvider.java rename to smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/JsonBProvider.java index 059837410a..30c6688bbd 100644 --- a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/JsonBProvider.java +++ b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/JsonBProvider.java @@ -1,4 +1,4 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jsonb; import jakarta.enterprise.context.ApplicationScoped; import jakarta.enterprise.inject.Produces; diff --git a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/Person.java b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/Person.java similarity index 91% rename from smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/Person.java rename to smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/Person.java index c67da3a6dd..20f542b710 100644 --- a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/Person.java +++ b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/Person.java @@ -1,4 +1,4 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jsonb; public class Person { diff --git a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/PersonConsumerBean.java b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/PersonConsumerBean.java similarity index 90% rename from smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/PersonConsumerBean.java rename to smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/PersonConsumerBean.java index 5e3243bb1c..e207309972 100644 --- a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/PersonConsumerBean.java +++ b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/PersonConsumerBean.java @@ -1,4 +1,4 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jsonb; import java.util.ArrayList; import java.util.List; diff --git a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/PersonProducerBean.java b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/PersonProducerBean.java similarity index 91% rename from smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/PersonProducerBean.java rename to smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/PersonProducerBean.java index 3247a24551..2f1c5fb33e 100644 --- a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/PersonProducerBean.java +++ b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/PersonProducerBean.java @@ -1,4 +1,4 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jsonb; import jakarta.enterprise.context.ApplicationScoped; diff --git a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/TestObject.java b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/TestObject.java similarity index 78% rename from smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/TestObject.java rename to smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/TestObject.java index 92759488ff..0ea6162f30 100644 --- a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/TestObject.java +++ b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/json/jsonb/TestObject.java @@ -1,7 +1,9 @@ -package io.smallrye.reactive.messaging.json; +package io.smallrye.reactive.messaging.json.jsonb; import jakarta.json.bind.annotation.JsonbProperty; +import io.smallrye.reactive.messaging.json.JsonMapping; + /** * Test object to use in {@link JsonMapping} implementation. */ diff --git a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/support/JmsTestBase.java b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/support/JmsTestBase.java index cce5e385cf..2bc22720f4 100644 --- a/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/support/JmsTestBase.java +++ b/smallrye-reactive-messaging-jsonb/src/test/java/io/smallrye/reactive/messaging/support/JmsTestBase.java @@ -9,8 +9,8 @@ import io.smallrye.config.SmallRyeConfigProviderResolver; import io.smallrye.config.inject.ConfigExtension; import io.smallrye.reactive.messaging.jms.JmsConnector; -import io.smallrye.reactive.messaging.json.JsonBMapping; -import io.smallrye.reactive.messaging.json.JsonBProvider; +import io.smallrye.reactive.messaging.json.jsonb.JsonBMapping; +import io.smallrye.reactive.messaging.json.jsonb.JsonBProvider; import io.smallrye.reactive.messaging.providers.MediatorFactory; import io.smallrye.reactive.messaging.providers.connectors.ExecutionHolder; import io.smallrye.reactive.messaging.providers.connectors.WorkerPoolRegistry; diff --git a/smallrye-reactive-messaging-mqtt/src/test/java/io/smallrye/reactive/messaging/mqtt/DynamicMqttTopicSourceTest.java b/smallrye-reactive-messaging-mqtt/src/test/java/io/smallrye/reactive/messaging/mqtt/DynamicMqttTopicSourceTest.java index 75956e432f..8d6164eae9 100644 --- a/smallrye-reactive-messaging-mqtt/src/test/java/io/smallrye/reactive/messaging/mqtt/DynamicMqttTopicSourceTest.java +++ b/smallrye-reactive-messaging-mqtt/src/test/java/io/smallrye/reactive/messaging/mqtt/DynamicMqttTopicSourceTest.java @@ -48,6 +48,10 @@ private void awaitAndVerify() { .pollInterval(Duration.ofSeconds(1)) .until(() -> connector.getReadiness().isOk()); + await() + .pollInterval(Duration.ofSeconds(1)) + .until(() -> connector.getLiveness().isOk()); + bean.publish(); await().until(() -> bean.messages().size() >= 3); @@ -155,23 +159,36 @@ public void publish() { emitter.send(MqttMessage .of("/app/hello/mqtt-" + LocalDate.now().toString() + "/greeting", "hello from dynamic topic 1", MqttQoS.EXACTLY_ONCE)); + nap(10); emitter.send(MqttMessage .of("/app/hello/mqtt-" + LocalDate.now().toString() + "/greeting", "hello from dynamic topic 2", MqttQoS.EXACTLY_ONCE)); + nap(10); emitter.send(MqttMessage .of("/app/hello/mqtt-" + LocalDate.now().toString() + "/greeting", "hello from dynamic topic 3", MqttQoS.EXACTLY_ONCE)); + nap(15); emitter.send(MqttMessage .of("$/app/hello/mqtt-" + LocalDate.now().toString() + "/greeting", "hello from dynamic topic 4", MqttQoS.EXACTLY_ONCE)); + nap(10); emitter.send(MqttMessage .of("$/app/hello/mqtt-" + LocalDate.now().toString() + "/greeting", "hello from dynamic topic 5", MqttQoS.EXACTLY_ONCE)); + nap(5); emitter.send(MqttMessage .of("$/app/hello/mqtt-" + LocalDate.now().toString() + "/greeting", "hello from dynamic topic 6", MqttQoS.EXACTLY_ONCE)); } + private void nap(int duration) { + try { + Thread.sleep(duration); + } catch (Exception ignored) { + // ignored. + } + } + @Incoming("in") public CompletionStage received(MqttMessage message) { messages.add(message);