diff --git a/mqtt-broker/pom.xml b/mqtt-broker/pom.xml index 8fe393e3..05c18b0d 100644 --- a/mqtt-broker/pom.xml +++ b/mqtt-broker/pom.xml @@ -20,7 +20,7 @@ pulsar-protocol-handler-mqtt-parent io.streamnative.pulsar.handlers - 4.0.14.1 + 4.0.14.4 4.0.0 pulsar-protocol-handler-mqtt diff --git a/mqtt-common/pom.xml b/mqtt-common/pom.xml index d0a18442..cbf86549 100644 --- a/mqtt-common/pom.xml +++ b/mqtt-common/pom.xml @@ -20,7 +20,7 @@ pulsar-protocol-handler-mqtt-parent io.streamnative.pulsar.handlers - 4.0.14.1 + 4.0.14.4 4.0.0 pulsar-protocol-handler-mqtt-common diff --git a/mqtt-proxy/pom.xml b/mqtt-proxy/pom.xml index 852aba20..83ee774e 100644 --- a/mqtt-proxy/pom.xml +++ b/mqtt-proxy/pom.xml @@ -20,7 +20,7 @@ pulsar-protocol-handler-mqtt-parent io.streamnative.pulsar.handlers - 4.0.14.1 + 4.0.14.4 4.0.0 pulsar-protocol-handler-mqtt-proxy diff --git a/pom.xml b/pom.xml index 01c6c528..43b65334 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> io.streamnative.pulsar.handlers pulsar-protocol-handler-mqtt-parent - 4.0.14.1 + 4.0.14.4 StreamNative :: Pulsar Protocol Handler :: MoP Parent Parent for MQTT on Pulsar implemented using Pulsar Protocol Handler. @@ -51,8 +51,8 @@ 2.22.0 6.14.3 4.0.2 - 4.0.14.1 - 4.0.14.1 + 4.0.14.4 + 4.0.14.4 2.18.0 1.16 1.2.2 diff --git a/tests/pom.xml b/tests/pom.xml index 8e6de32d..3717daef 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -20,7 +20,7 @@ pulsar-protocol-handler-mqtt-parent io.streamnative.pulsar.handlers - 4.0.14.1 + 4.0.14.4 4.0.0 pulsar-protocol-handler-mqtt-tests diff --git a/tests/src/test/java/io/streamnative/pulsar/handlers/mqtt/mqtt3/fusesource/base/SimpleIntegrationTest.java b/tests/src/test/java/io/streamnative/pulsar/handlers/mqtt/mqtt3/fusesource/base/SimpleIntegrationTest.java index 2062748d..f3f19355 100644 --- a/tests/src/test/java/io/streamnative/pulsar/handlers/mqtt/mqtt3/fusesource/base/SimpleIntegrationTest.java +++ b/tests/src/test/java/io/streamnative/pulsar/handlers/mqtt/mqtt3/fusesource/base/SimpleIntegrationTest.java @@ -15,7 +15,7 @@ import static org.mockito.Mockito.verify; import com.google.gson.Gson; -import com.google.gson.internal.LinkedTreeMap; +import com.google.gson.JsonObject; import io.netty.bootstrap.Bootstrap; import io.netty.channel.ChannelFutureListener; import io.netty.channel.EventLoopGroup; @@ -587,11 +587,11 @@ public void testConnectionWithSameClientId() throws Exception { buffer.append(str); } String result = buffer.toString(); - LinkedTreeMap treeMap = new Gson().fromJson(result, LinkedTreeMap.class); - LinkedTreeMap clients = (LinkedTreeMap) treeMap.get("clients"); + JsonObject stats = new Gson().fromJson(result, JsonObject.class); + JsonObject clients = stats.getAsJsonObject("clients"); Awaitility.await().untilAsserted(() -> { - Assert.assertEquals(clients.get("active"), 1.0); - Assert.assertEquals(clients.get("total"), 2.0); + Assert.assertEquals(clients.get("active").getAsInt(), 1); + Assert.assertEquals(clients.get("total").getAsInt(), 2); }); } diff --git a/tests/src/test/java/io/streamnative/pulsar/handlers/mqtt/mqtt3/fusesource/proxy/ProxyTest.java b/tests/src/test/java/io/streamnative/pulsar/handlers/mqtt/mqtt3/fusesource/proxy/ProxyTest.java index 7f69a504..cc96b0fe 100644 --- a/tests/src/test/java/io/streamnative/pulsar/handlers/mqtt/mqtt3/fusesource/proxy/ProxyTest.java +++ b/tests/src/test/java/io/streamnative/pulsar/handlers/mqtt/mqtt3/fusesource/proxy/ProxyTest.java @@ -17,7 +17,7 @@ import static org.mockito.Mockito.verify; import com.google.common.util.concurrent.AtomicDouble; import com.google.gson.Gson; -import com.google.gson.internal.LinkedTreeMap; +import com.google.gson.JsonObject; import io.netty.bootstrap.Bootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFutureListener; @@ -312,9 +312,9 @@ public void testProxyProcessPingReq() { buffer.append(str); } String ret = buffer.toString(); - LinkedTreeMap treeMap = new Gson().fromJson(ret, LinkedTreeMap.class); - LinkedTreeMap clients = (LinkedTreeMap) treeMap.get("clients"); - active.set((Double) clients.get("active")); + JsonObject stats = new Gson().fromJson(ret, JsonObject.class); + JsonObject clients = stats.getAsJsonObject("clients"); + active.set(clients.get("active").getAsDouble()); result.complete(null); } catch (Throwable ex) { result.completeExceptionally(ex);