From 1b99a646757aa6439a2339e7556098b643e28375 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 26 Oct 2016 11:58:36 +0530 Subject: [PATCH] resolves #2 --- .../hive/hcatalog/listener/TestMsgBusConnection.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestMsgBusConnection.java b/hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestMsgBusConnection.java index 3279da1..3c4e50b 100644 --- a/hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestMsgBusConnection.java +++ b/hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestMsgBusConnection.java @@ -48,7 +48,7 @@ public class TestMsgBusConnection extends TestCase { private Driver driver; private BrokerService broker; private MessageConsumer consumer; - + private static final int TIMEOUT = 2000; @Override protected void setUp() throws Exception { @@ -88,7 +88,7 @@ public void testConnection() throws Exception { try { driver.run("create database testconndb"); - Message msg = consumer.receive(); + Message msg = consumer.receive(TIMEOUT); assertTrue("Expected TextMessage", msg instanceof TextMessage); assertEquals(HCatConstants.HCAT_CREATE_DATABASE_EVENT, msg.getStringProperty(HCatConstants.HCAT_EVENT)); @@ -100,13 +100,13 @@ public void testConnection() throws Exception { broker.start(true); connectClient(); driver.run("create database testconndb"); - msg = consumer.receive(); + msg = consumer.receive(TIMEOUT); assertEquals(HCatConstants.HCAT_CREATE_DATABASE_EVENT, msg.getStringProperty(HCatConstants.HCAT_EVENT)); assertEquals("topic://planetlab.hcat", msg.getJMSDestination().toString()); assertEquals("testconndb", messageObject.getDB()); driver.run("drop database testconndb cascade"); - msg = consumer.receive(); + msg = consumer.receive(TIMEOUT); assertEquals(HCatConstants.HCAT_DROP_DATABASE_EVENT, msg.getStringProperty(HCatConstants.HCAT_EVENT)); assertEquals("topic://planetlab.hcat", msg.getJMSDestination().toString());