falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suh...@apache.org
Subject falcon git commit: FALCON-1064 Build hangs at the following test: JMSMessageProducerTest. Contributed by Sowmya Ramesh
Date Thu, 19 Mar 2015 07:14:43 GMT
Repository: falcon
Updated Branches:
  refs/heads/master bc3d23bd0 -> 36df77a32


FALCON-1064 Build hangs at the following test: JMSMessageProducerTest. Contributed by Sowmya
Ramesh


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

Branch: refs/heads/master
Commit: 36df77a32d6fdd12195460ac264522521d9bd692
Parents: bc3d23b
Author: Suhas Vasu <suhas.v@inmobi.com>
Authored: Thu Mar 19 12:44:22 2015 +0530
Committer: Suhas Vasu <suhas.v@inmobi.com>
Committed: Thu Mar 19 12:44:22 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                               |  3 +++
 .../apache/falcon/messaging/JMSMessageProducerTest.java   | 10 +++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/36df77a3/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 96cca70..027f703 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -114,6 +114,9 @@ Trunk (Unreleased)
    (Suhas vasu)
 
   BUG FIXES
+   FALCON-1064 Build hangs at the following test: JMSMessageProducerTest
+   (Sowmya Ramesh via Suhas Vasu)
+
    FALCON-1070 numResults and offset doesnot work for instance operations
    (Suhas Vasu)
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/36df77a3/messaging/src/test/java/org/apache/falcon/messaging/JMSMessageProducerTest.java
----------------------------------------------------------------------
diff --git a/messaging/src/test/java/org/apache/falcon/messaging/JMSMessageProducerTest.java
b/messaging/src/test/java/org/apache/falcon/messaging/JMSMessageProducerTest.java
index d4373de..2d27ce3 100644
--- a/messaging/src/test/java/org/apache/falcon/messaging/JMSMessageProducerTest.java
+++ b/messaging/src/test/java/org/apache/falcon/messaging/JMSMessageProducerTest.java
@@ -52,7 +52,6 @@ public class JMSMessageProducerTest {
     private List<MapMessage> mapMessages;
 
     private volatile AssertionError error;
-    private CountDownLatch latch = new CountDownLatch(1);
 
     @BeforeClass
     public void setup() throws Exception {
@@ -162,13 +161,14 @@ public class JMSMessageProducerTest {
                 "-" + WorkflowExecutionArgs.CLUSTER_NAME.getName(), "corp"));
     }
 
-    private void testProcessMessageCreator(final List<String[]> messages,
-                                           final String topicsToListen) throws Exception
{
+    private synchronized void testProcessMessageCreator(final List<String[]> messages,
+                                                        final String topicsToListen) throws
Exception {
+        final CountDownLatch latch = new CountDownLatch(1);
         Thread t = new Thread() {
             @Override
             public void run() {
                 try {
-                    consumer(messages.size(), topicsToListen);
+                    consumer(messages.size(), topicsToListen, latch);
                 } catch (AssertionError e) {
                     error = e;
                 } catch (Exception ignore) {
@@ -195,7 +195,7 @@ public class JMSMessageProducerTest {
         }
     }
 
-    private void consumer(int size, String topicsToListen) throws Exception {
+    private void consumer(int size, String topicsToListen, CountDownLatch latch) throws Exception
{
         ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(BROKER_URL);
         Connection connection = connectionFactory.createConnection();
         connection.start();


Mime
View raw message