Author: shawkins
Date: 2011-01-28 11:30:26 -0500 (Fri, 28 Jan 2011)
New Revision: 2882
Modified:
branches/7.3.x/runtime/src/test/java/org/teiid/transport/TestFailover.java
Log:
TEIID-1451 ensuring that the logon result gets cleared when disconnected
Modified: branches/7.3.x/runtime/src/test/java/org/teiid/transport/TestFailover.java
===================================================================
--- branches/7.3.x/runtime/src/test/java/org/teiid/transport/TestFailover.java 2011-01-28
16:30:06 UTC (rev 2881)
+++ branches/7.3.x/runtime/src/test/java/org/teiid/transport/TestFailover.java 2011-01-28
16:30:26 UTC (rev 2882)
@@ -28,6 +28,7 @@
import java.net.InetSocketAddress;
import java.util.Properties;
+import org.junit.After;
import org.junit.Test;
import org.teiid.client.security.ILogon;
import org.teiid.client.security.InvalidSessionException;
@@ -58,6 +59,15 @@
private SocketServerConnectionFactory sscf;
private InetSocketAddress addr = new InetSocketAddress(0);
private int logonAttempts;
+
+ @After public void tearDown() {
+ if (this.listener != null) {
+ this.listener.stop();
+ }
+ if (this.listener1 != null) {
+ this.listener1.stop();
+ }
+ }
private SocketServerConnection helpEstablishConnection(boolean clientSecure,
SSLConfiguration config, Properties socketConfig) throws CommunicationException,
ConnectionException {
@@ -121,6 +131,7 @@
//bring the first back up
listener = createListener(new InetSocketAddress(addr.getAddress(), listener.getPort()),
config);
assertTrue(conn.isOpen(1000));
+ assertEquals(3, logonAttempts);
conn.close();
}
Show replies by date