activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andytay...@apache.org
Subject [1/3] activemq-6 git commit: Fix test, adjust logging
Date Tue, 27 Jan 2015 09:12:10 GMT
Repository: activemq-6
Updated Branches:
  refs/heads/master 005af9dea -> 3498b7b0f


Fix test, adjust logging


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

Branch: refs/heads/master
Commit: dfb7d3c382382b6e5f0647fb81703931702d0790
Parents: 005af9d
Author: jbertram <jbertram@redhat.com>
Authored: Mon Jan 26 14:03:54 2015 -0600
Committer: jbertram <jbertram@redhat.com>
Committed: Mon Jan 26 14:03:54 2015 -0600

----------------------------------------------------------------------
 .../core/client/ActiveMQClientMessageBundle.java        |  4 ++--
 .../activemq/core/protocol/core/impl/ChannelImpl.java   |  2 +-
 .../tests/integration/cluster/bridge/BridgeTest.java    | 12 +++++++-----
 3 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-6/blob/dfb7d3c3/activemq-core-client/src/main/java/org/apache/activemq/core/client/ActiveMQClientMessageBundle.java
----------------------------------------------------------------------
diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/ActiveMQClientMessageBundle.java
b/activemq-core-client/src/main/java/org/apache/activemq/core/client/ActiveMQClientMessageBundle.java
index 37588e2..145eedb 100644
--- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/ActiveMQClientMessageBundle.java
+++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/ActiveMQClientMessageBundle.java
@@ -97,8 +97,8 @@ public interface ActiveMQClientMessageBundle
    @Message(id = 119013, value =  "Timed out waiting to receive cluster topology. Group:{0}",
format = Message.Format.MESSAGE_FORMAT)
    ActiveMQConnectionTimedOutException connectionTimedOutOnReceiveTopology(DiscoveryGroup
discoveryGroup);
 
-   @Message(id = 119014, value =  "Timed out waiting for response when sending packet {0}",
format = Message.Format.MESSAGE_FORMAT)
-   ActiveMQConnectionTimedOutException timedOutSendingPacket(Byte type);
+   @Message(id = 119014, value =  "Timed out after waiting {0} ms for response when sending
packet {1}", format = Message.Format.MESSAGE_FORMAT)
+   ActiveMQConnectionTimedOutException timedOutSendingPacket(long timeout, Byte type);
 
    @Message(id = 119015, value =  "The connection was disconnected because of server shutdown",
format = Message.Format.MESSAGE_FORMAT)
    ActiveMQDisconnectedException disconnected();

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/dfb7d3c3/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java
----------------------------------------------------------------------
diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java
b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java
index 579ff23..3b284a2 100644
--- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java
+++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java
@@ -403,7 +403,7 @@ public final class ChannelImpl implements Channel
 
             if (response == null)
             {
-               throw ActiveMQClientMessageBundle.BUNDLE.timedOutSendingPacket(packet.getType());
+               throw ActiveMQClientMessageBundle.BUNDLE.timedOutSendingPacket(connection.getBlockingCallTimeout(),
packet.getType());
             }
 
             if (response.getType() == PacketImpl.EXCEPTION)

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/dfb7d3c3/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeTest.java
index 280b3a1..06c306e 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/bridge/BridgeTest.java
@@ -54,6 +54,7 @@ import org.apache.activemq.core.server.Queue;
 import org.apache.activemq.core.server.cluster.impl.BridgeImpl;
 import org.apache.activemq.core.transaction.impl.TransactionImpl;
 import org.apache.activemq.spi.core.protocol.RemotingConnection;
+import org.apache.activemq.tests.integration.IntegrationTestLogger;
 import org.apache.activemq.tests.util.RandomUtil;
 import org.apache.activemq.tests.util.ServiceTestBase;
 import org.apache.activemq.tests.util.UnitTestCase;
@@ -310,13 +311,13 @@ public class BridgeTest extends ServiceTestBase
                ignoreSends && packet instanceof SessionSendLargeMessage ||
                ignoreSends && packet instanceof SessionSendContinuationMessage &&
!((SessionSendContinuationMessage) packet).isContinues())
             {
-               System.out.println("Ignored");
+               IntegrationTestLogger.LOGGER.info("IGNORED: " + packet);
                latch.countDown();
                return false;
             }
             else
             {
-               System.out.println(packet);
+               IntegrationTestLogger.LOGGER.info(packet);
                return true;
             }
          }
@@ -359,9 +360,8 @@ public class BridgeTest extends ServiceTestBase
          .setReconnectAttemptsOnSameNode(-1)
          .setUseDuplicateDetection(false)
          .setConfirmationWindowSize(numMessages * messageSize / 2)
-         .setStaticConnectors(connectorConfig);
-
-      bridgeConfiguration.setCallTimeout(500);
+         .setStaticConnectors(connectorConfig)
+         .setCallTimeout(5000);
 
       List<BridgeConfiguration> bridgeConfigs = new ArrayList<BridgeConfiguration>();
       bridgeConfigs.add(bridgeConfiguration);
@@ -423,6 +423,8 @@ public class BridgeTest extends ServiceTestBase
 
       assertTrue("where is the countDown?", myInterceptor.latch.await(30, TimeUnit.SECONDS));
       myInterceptor.ignoreSends = false;
+      server1.getRemotingService().removeIncomingInterceptor(myInterceptor);
+      IntegrationTestLogger.LOGGER.info("No longer ignoring packets.");
 
       for (int i = 0; i < numMessages; i++)
       {


Mime
View raw message