Skip to content

Commit

Permalink
resolves #2
Browse files Browse the repository at this point in the history
  • Loading branch information
yussufsh committed Oct 26, 2016
1 parent 7e621ed commit 1b99a64
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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));
Expand All @@ -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());
Expand Down

0 comments on commit 1b99a64

Please sign in to comment.