This closes #2764
This commit is contained in:
commit
fa000524e1
|
@ -100,6 +100,8 @@ public class StompV11Test extends StompTestBase {
|
|||
server.getSecurityStore().setSecurityEnabled(true);
|
||||
StompClientConnection connection = StompClientConnectionFactory.createClientConnection(v10Uri);
|
||||
|
||||
try {
|
||||
|
||||
connection.connect(defUser, defPass);
|
||||
|
||||
assertTrue(connection.isConnected());
|
||||
|
@ -108,6 +110,8 @@ public class StompV11Test extends StompTestBase {
|
|||
|
||||
connection.disconnect();
|
||||
|
||||
connection.closeTransport();
|
||||
|
||||
connection = StompClientConnectionFactory.createClientConnection(uri);
|
||||
|
||||
connection.connect(defUser, defPass);
|
||||
|
@ -118,6 +122,8 @@ public class StompV11Test extends StompTestBase {
|
|||
|
||||
connection.disconnect();
|
||||
|
||||
connection.closeTransport();
|
||||
|
||||
connection = StompClientConnectionFactory.createClientConnection(uri);
|
||||
|
||||
connection.connect();
|
||||
|
@ -132,12 +138,19 @@ public class StompV11Test extends StompTestBase {
|
|||
|
||||
conn.disconnect();
|
||||
|
||||
conn.closeTransport();
|
||||
|
||||
//invalid user
|
||||
conn = (StompClientConnectionV11) StompClientConnectionFactory.createClientConnection(uri);
|
||||
ClientStompFrame frame = conn.connect("invaliduser", defPass);
|
||||
assertFalse(conn.isConnected());
|
||||
assertTrue(Stomp.Responses.ERROR.equals(frame.getCommand()));
|
||||
assertTrue(frame.getBody().contains("Security Error occurred"));
|
||||
|
||||
conn.closeTransport();
|
||||
} finally {
|
||||
connection.closeTransport();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue