This closes #130 fixes
This commit is contained in:
commit
6665e58370
|
@ -201,11 +201,12 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor {
|
|||
// the connection handles pings, negotiations directly.
|
||||
// and delegate all other commands to manager.
|
||||
if (command.getClass() == KeepAliveInfo.class) {
|
||||
dataReceived = true;
|
||||
KeepAliveInfo info = (KeepAliveInfo) command;
|
||||
if (info.isResponseRequired()) {
|
||||
info.setResponseRequired(false);
|
||||
protocolManager.sendReply(this, info);
|
||||
}
|
||||
info.setResponseRequired(false);
|
||||
// if we don't respond to KeepAlive commands then the client will think the server is dead and timeout
|
||||
// for some reason KeepAliveInfo.isResponseRequired() is always false
|
||||
protocolManager.sendReply(this, info);
|
||||
}
|
||||
else if (command.getClass() == WireFormatInfo.class) {
|
||||
// amq here starts a read/write monitor thread (detect ttl?)
|
||||
|
|
|
@ -1941,7 +1941,6 @@ public class FailoverTest extends FailoverTestBase {
|
|||
public void testBackupServerNotRemoved() throws Exception {
|
||||
// HORNETQ-720 Disabling test for replicating backups.
|
||||
if (!(backupServer.getServer().getHAPolicy() instanceof SharedStoreSlavePolicy)) {
|
||||
waitForComponent(backupServer, 1);
|
||||
return;
|
||||
}
|
||||
locator.setFailoverOnInitialConnection(true);
|
||||
|
|
|
@ -34,7 +34,13 @@ public class ReplicatedLargeMessageWithDelayFailoverTest extends ReplicatedLarge
|
|||
startBackupServer = false;
|
||||
super.setUp();
|
||||
syncDelay = new BackupSyncDelay(backupServer, liveServer);
|
||||
backupServer.start();
|
||||
|
||||
/* Using getName() here is a bit of a hack, but if the backup is started for this test then the test will fail
|
||||
* intermittently due to an InterruptedException.
|
||||
*/
|
||||
if (!getName().equals("testBackupServerNotRemoved")) {
|
||||
backupServer.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -87,6 +87,16 @@ public class SimpleOpenWireTest extends BasicOpenWireTest {
|
|||
session.close();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testKeepAlive() throws Exception {
|
||||
connection.start();
|
||||
|
||||
Thread.sleep(125000);
|
||||
|
||||
connection.createSession(false, 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSimpleTopic() throws Exception {
|
||||
connection.start();
|
||||
|
|
Loading…
Reference in New Issue