diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3439cb5c..0fd43e97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: java: [ '8', '11', '17' ] - platform: [ 'ubuntu-latest', 'macos-12', 'windows-latest' ] + platform: [ 'windows-latest' ] # 'ubuntu-latest', 'macos-12', exclude: - platform: ${{ github.repository == 'open-coap/kotlin-mbedtls' || 'macos-12' }} diff --git a/kotlin-mbedtls/src/test/kotlin/org/opencoap/ssl/transport/DtlsServerTest.kt b/kotlin-mbedtls/src/test/kotlin/org/opencoap/ssl/transport/DtlsServerTest.kt index 844c1f0d..dc6709f4 100644 --- a/kotlin-mbedtls/src/test/kotlin/org/opencoap/ssl/transport/DtlsServerTest.kt +++ b/kotlin-mbedtls/src/test/kotlin/org/opencoap/ssl/transport/DtlsServerTest.kt @@ -115,12 +115,13 @@ class DtlsServerTest { assertEquals(1, dtlsServer.numberOfSessions) - val javaVersion = System.getProperty("java.version").split(".").first().toIntOrNull() ?: 0 - println("Java version: $javaVersion") - println("OS: ${System.getProperty("os.name")}") - if (!(System.getProperty("os.name").startsWith("Windows") && javaVersion <= 11)) { - assertTrue(serverOutboundQueue.isEmpty()) + var serverOutboundQueueIsEmpty = false + repeat(10) { + serverOutboundQueueIsEmpty = serverOutboundQueue.isEmpty() + Thread.sleep(500) } + assertTrue(serverOutboundQueueIsEmpty) + clientSession.close() } @@ -181,6 +182,7 @@ class DtlsServerTest { assertEquals("terve", dtlsServer.handleAndDecrypt(dtlsPacket)) assertTrue(serverOutboundQueue.isEmpty()) + clientSession.close() }