mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 05:56:53 +00:00
Subscribe to remote presence changes before setting the key
This commit is contained in:
1 parent
46227295ff
commit
830a07012b
2 files changed
+62
-18
No files matched your search
+9
-3
@@ -386,8 +386,8 @@ class ClientPresenceManagerTest {
|
||||
displaced.join();
|
||||
}
|
||||
|
||||
@RepeatedTest(value = 10, failureThreshold = 1)
|
||||
void testConcurrentConnection() {
|
||||
@RepeatedTest(value = 100)
|
||||
void testConcurrentConnection() throws Exception {
|
||||
final UUID uuid1 = UUID.randomUUID();
|
||||
final byte deviceId = 1;
|
||||
|
||||
@@ -400,7 +400,13 @@ class ClientPresenceManagerTest {
|
||||
server1Thread.start();
|
||||
server2Thread.start();
|
||||
|
||||
assertTimeoutPreemptively(Duration.ofSeconds(10), displaced::join);
|
||||
displaced.join();
|
||||
server2Thread.join();
|
||||
server1Thread.join();
|
||||
|
||||
while (server1.isLocallyPresent(uuid1, deviceId) == server2.isLocallyPresent(uuid1, deviceId)) {
|
||||
Thread.sleep(50);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user