Sfoglia il codice sorgente

Fix unit tests

tags/v0.6.0
Chris Smith 5 anni fa
parent
commit
cd952f3b79
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5
    0
      src/test/kotlin/com/dmdirc/ktirc/IrcClientTest.kt

+ 5
- 0
src/test/kotlin/com/dmdirc/ktirc/IrcClientTest.kt Vedi File

@@ -105,6 +105,11 @@ internal class IrcClientImplTest {
105 105
         client.onEvent(mockEventHandler)
106 106
         readLineChannel.close()
107 107
 
108
+        // Horrible hacks to make sure we've disconnected.
109
+        while (client.serverState.status != ServerStatus.Disconnected) {
110
+            delay(10)
111
+        }
112
+
108 113
         val captor = argumentCaptor<ServerDisconnected>()
109 114
         verify(mockEventHandler, timeout(500).atLeast(2)).invoke(captor.capture())
110 115
         assertEquals(TestConstants.time, captor.lastValue.time)

Loading…
Annulla
Salva