Drop pub/sub operations from WebsocketConnection.

This commit is contained in:
Jon Chambers
2020-09-09 19:21:55 -04:00
committed by Jon Chambers
parent 4f2e06407b
commit 7e14a0bc30
8 changed files with 66 additions and 223 deletions

View File

@@ -59,6 +59,19 @@ public class ClientPresenceManagerTest extends AbstractRedisClusterTest {
assertTrue(clientPresenceManager.isPresent(accountUuid, deviceId));
}
@Test
public void testIsLocallyPresent() {
final UUID accountUuid = UUID.randomUUID();
final long deviceId = 1;
assertFalse(clientPresenceManager.isLocallyPresent(accountUuid, deviceId));
clientPresenceManager.setPresent(accountUuid, deviceId, NO_OP);
getRedisCluster().useCluster(connection -> connection.sync().flushall());
assertTrue(clientPresenceManager.isLocallyPresent(accountUuid, deviceId));
}
@Test
public void testLocalDisplacement() {
final UUID accountUuid = UUID.randomUUID();