Преглед на файлове

Fix unit tests

tags/v0.6.0
Chris Smith преди 5 години
родител
ревизия
cd952f3b79
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5
    0
      src/test/kotlin/com/dmdirc/ktirc/IrcClientTest.kt

+ 5
- 0
src/test/kotlin/com/dmdirc/ktirc/IrcClientTest.kt Целия файл

@@ -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…
Отказ
Запис