mirror of
https://github.com/layue13/MoonBridge.git
synced 2026-10-25 18:46:18 +00:00
Wait for capacity cleanup in backend close test
This commit is contained in:
1 parent
c99d296cd4
commit
112efd839d
1 file changed
+2
@@ -1547,6 +1547,8 @@ final class ProxySessionListenerTest {
|
||||
long deadline = System.nanoTime() + TimeUnit.SECONDS.toNanos(5);
|
||||
while (!listener.online().isEmpty() && System.nanoTime() < deadline) Thread.sleep(5);
|
||||
assertTrue(listener.online().isEmpty());
|
||||
while (catalog.find(backend.handle().id()).orElseThrow().availableUnits() != 1
|
||||
&& System.nanoTime() < deadline) Thread.sleep(5);
|
||||
assertEquals(1, catalog.find(backend.handle().id()).orElseThrow().availableUnits());
|
||||
while (listener.onlineCount() != 0 && System.nanoTime() < deadline) Thread.sleep(5);
|
||||
assertEquals(0, requestStatus(listenPort).path("players").path("online").asInt());
|
||||
|
||||
Reference in new issue
Block a user