activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/2] activemq-artemis git commit: ARTEMIS-1947 fix tests
Date Mon, 06 Aug 2018 21:45:18 GMT
ARTEMIS-1947 fix tests

(cherry picked from commit 7d14c06dd965adff409c32e2a962bad7948b1bca)


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/091dcbea
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/091dcbea
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/091dcbea

Branch: refs/heads/2.6.x
Commit: 091dcbea4bb20e0bf6d72c504ad66c25aa4405bc
Parents: d369a96
Author: Justin Bertram <jbertram@apache.org>
Authored: Mon Aug 6 09:15:15 2018 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Mon Aug 6 13:52:18 2018 -0400

----------------------------------------------------------------------
 .../integration/management/ActiveMQServerControlTest.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/091dcbea/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
index 048d506..2b76de6 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
@@ -1550,8 +1550,8 @@ public class ActiveMQServerControlTest extends ManagementTestBase {
       Assert.assertEquals("myUser", second.getString("principal"));
       Assert.assertTrue(second.getJsonNumber("creationTime").longValue() > 0);
       Assert.assertEquals(1, second.getJsonNumber("consumerCount").longValue());
-      Assert.assertTrue(second.getJsonString("metadata").getString().contains("foo=bar"));
-      Assert.assertTrue(second.getJsonString("metadata").getString().contains("bar=baz"));
+      Assert.assertEquals(second.getJsonObject("metadata").getJsonString("foo").getString(),
"bar");
+      Assert.assertEquals(second.getJsonObject("metadata").getJsonString("bar").getString(),
"baz");
    }
 
    @Test
@@ -1572,8 +1572,8 @@ public class ActiveMQServerControlTest extends ManagementTestBase {
       JsonArray array = JsonUtil.readJsonArray(jsonString);
       Assert.assertEquals(1 + (usingCore() ? 1 : 0), array.size());
       JsonObject obj = lookupSession(array, ((ActiveMQConnection)con).getInitialSession());
-      Assert.assertTrue(obj.getString("metadata").contains(ClientSession.JMS_SESSION_CLIENT_ID_PROPERTY
+ "=" + clientID));
-      Assert.assertTrue(obj.getString("metadata").contains(ClientSession.JMS_SESSION_IDENTIFIER_PROPERTY));
+      Assert.assertEquals(obj.getJsonObject("metadata").getJsonString(ClientSession.JMS_SESSION_CLIENT_ID_PROPERTY).getString(),
clientID);
+      Assert.assertNotNull(obj.getJsonObject("metadata").getJsonString(ClientSession.JMS_SESSION_IDENTIFIER_PROPERTY));
    }
 
    @Test


Mime
View raw message