Author: ataylor
Date: 2010-11-04 04:13:02 -0400 (Thu, 04 Nov 2010)
New Revision: 9844
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/client/ServerLocatorConnectTest.java
Log:
test fix
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/client/ServerLocatorConnectTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/client/ServerLocatorConnectTest.java 2010-11-04
08:04:34 UTC (rev 9843)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/client/ServerLocatorConnectTest.java 2010-11-04
08:13:02 UTC (rev 9844)
@@ -140,11 +140,10 @@
Thread t = new Thread(target);
t.start();
//let them get started
- Thread.sleep(1500);
+ Thread.sleep(500);
locator.close();
assertTrue(countDownLatch.await(5, TimeUnit.SECONDS));
- assertTrue(target.e instanceof HornetQException);
- assertEquals(((HornetQException)target.e).getCode(),
HornetQException.NOT_CONNECTED);
+ assertNull(target.csf);
}
public boolean isNetty()
@@ -155,6 +154,7 @@
static class Connector implements Runnable
{
private ServerLocatorInternal locator;
+ ClientSessionFactory csf = null;
CountDownLatch latch;
Exception e;
public Connector(ServerLocatorInternal locator, CountDownLatch latch)
@@ -167,7 +167,7 @@
{
try
{
- locator.connect();
+ csf = locator.connect();
}
catch (Exception e)
{