mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-4028 - ws transport test - disconnect client when finished
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1388056 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c6595066e9
commit
0f9647c1f8
|
@ -245,6 +245,15 @@ public class WSTransportTest {
|
|||
return webReceived.getText().equals("messages #" + MESSAGE_COUNT);
|
||||
}
|
||||
}));
|
||||
|
||||
Thread.sleep(1000);
|
||||
|
||||
assertTrue("Should have disconnected", Wait.waitFor(new Wait.Condition() {
|
||||
|
||||
public boolean isSatisified() throws Exception {
|
||||
return webStatus.getText().equals("Disconnected");
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,6 +48,11 @@
|
|||
$("#status").html("Connected");
|
||||
client.subscribe(destination, function(message) {
|
||||
$("#received").html(message.body);
|
||||
if (message.body == "messages #1000") {
|
||||
client.disconnect(function() {
|
||||
$("#status").html("Disconnected");
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue