From 7ca05753bfe227d4e2c99f932ee63c88d4df8e62 Mon Sep 17 00:00:00 2001 From: Thiago Kronig Date: Fri, 8 May 2015 21:06:49 -0300 Subject: [PATCH] Fix integration-tests: Arrays.toString(..) and ignored AssertionError --- .../artemis/tests/integration/client/LargeMessageTest.java | 3 ++- .../artemis/tests/integration/discovery/DiscoveryTest.java | 2 +- .../tests/integration/management/ManagementHelperTest.java | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/LargeMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/LargeMessageTest.java index 02fd2081bc..65bdea841f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/LargeMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/LargeMessageTest.java @@ -235,8 +235,9 @@ public class LargeMessageTest extends LargeMessageTestBase msg1.getBodyBuffer().readByte(); Assert.fail("Exception was expected"); } - catch (Throwable ignored) + catch (final Exception ignored) { + // empty on purpose } session.close(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryTest.java index 82037a1365..84a03f6464 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryTest.java @@ -391,7 +391,7 @@ public class DiscoveryTest extends DiscoveryBaseTest byte[] btreceived = client.receiveBroadcast(5, TimeUnit.SECONDS); - System.out.println("BTReceived = " + btreceived); + System.out.println("BTReceived = " + Arrays.toString(btreceived)); assertNotNull(btreceived); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementHelperTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementHelperTest.java index dbf526608d..d6c2da7a49 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementHelperTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementHelperTest.java @@ -16,6 +16,7 @@ */ package org.apache.activemq.artemis.tests.integration.management; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -193,12 +194,12 @@ public class ManagementHelperTest extends Assert String key1 = RandomUtil.randomString(); String[] val1 = new String[]{"a", "b", "c"}; - ManagementHelperTest.log.info("val1 type is " + val1); + ManagementHelperTest.log.info("val1 type is " + Arrays.toString(val1)); String key2 = RandomUtil.randomString(); Integer[] val2 = new Integer[]{1, 2, 3, 4, 5}; - ManagementHelperTest.log.info("val2 type is " + val2); + ManagementHelperTest.log.info("val2 type is " + Arrays.toString(val2)); map.put(key1, val1); map.put(key2, val2);