activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject [1/3] git commit: https://issues.apache.org/jira/browse/AMQ-5086 - init of broker got dropped after mutex wait - testWaitFor was failing
Date Mon, 14 Jul 2014 21:18:22 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk 318d52c53 -> 3b5d89a78


https://issues.apache.org/jira/browse/AMQ-5086 - init of broker got dropped after mutex wait
- testWaitFor was failing


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

Branch: refs/heads/trunk
Commit: a9b8d98ed73793e544228c6f37c54a01a390eaf8
Parents: ee08fc1
Author: gtully <gary.tully@gmail.com>
Authored: Mon Jul 14 16:49:03 2014 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Mon Jul 14 17:02:18 2014 +0100

----------------------------------------------------------------------
 .../org/apache/activemq/transport/vm/VMTransportFactory.java     | 1 +
 .../org/apache/activemq/transport/vm/VMTransportWaitForTest.java | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/a9b8d98e/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java
b/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java
index 938dc7d..50c8567 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java
@@ -196,6 +196,7 @@ public class VMTransportFactory extends TransportFactory {
                         try {
                             LOG.debug("waiting for broker named: " + brokerName + " to enter
registry");
                             registry.getRegistryMutext().wait(timeout);
+                            broker = registry.lookup(brokerName);
                         } catch (InterruptedException ignored) {
                         }
                     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/a9b8d98e/activemq-unit-tests/src/test/java/org/apache/activemq/transport/vm/VMTransportWaitForTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/transport/vm/VMTransportWaitForTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/transport/vm/VMTransportWaitForTest.java
index e498936..d7bd5ee 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/transport/vm/VMTransportWaitForTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/transport/vm/VMTransportWaitForTest.java
@@ -67,7 +67,7 @@ public class VMTransportWaitForTest {
 
         // spawn a thread that will wait for an embedded broker to start via
         // vm://..
-        Thread t = new Thread() {
+        Thread t = new Thread("ClientConnectionThread") {
             @Override
             public void run() {
                 try {
@@ -89,7 +89,7 @@ public class VMTransportWaitForTest {
         BrokerService broker = new BrokerService();
         broker.setPersistent(false);
         broker.start();
-        assertTrue("has got connection", gotConnection.await(400, TimeUnit.MILLISECONDS));
+        assertTrue("has got connection", gotConnection.await(5, TimeUnit.SECONDS));
         broker.stop();
     }
 


Mime
View raw message