소스 검색

Fix unit tests

tags/v1.0.1
Chris Smith 5 년 전
부모
커밋
8572ccd4eb
2개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 1
    0
      src/main/kotlin/com/dmdirc/ktirc/IrcClientImpl.kt
  2. 6
    0
      src/test/kotlin/com/dmdirc/ktirc/IrcClientImplTest.kt

+ 1
- 0
src/main/kotlin/com/dmdirc/ktirc/IrcClientImpl.kt 파일 보기

@@ -164,6 +164,7 @@ internal class IrcClientImpl(private val config: IrcClientConfig) : Experimental
164 164
         channelState.clear()
165 165
         userState.reset()
166 166
         socket = null
167
+        connecting.tryLock()
167 168
         connecting.unlock()
168 169
     }
169 170
 

+ 6
- 0
src/test/kotlin/com/dmdirc/ktirc/IrcClientImplTest.kt 파일 보기

@@ -453,6 +453,12 @@ internal class IrcClientImplTest {
453 453
         client.resolver = mockResolver
454 454
         client.connect()
455 455
 
456
+        launch {
457
+            delay(50)
458
+            readLineChannel.close()
459
+            sendLineChannel.close()
460
+        }
461
+
456 462
         client.disconnect()
457 463
 
458 464
         verify(timeout = 500) {

Loading…
취소
저장