-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for all targets in pure Kotlin modules, and unix targets …
…in Ktor modules Resolves: #234
- Loading branch information
1 parent
de95246
commit c177062
Showing
30 changed files
with
282 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
...est/kotlin/org/hildan/krossbow/websocket/test/autobahn/KtorDarwinWebSocketAutobahnTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.hildan.krossbow.websocket.test.autobahn | ||
|
||
import org.hildan.krossbow.websocket.WebSocketClient | ||
import org.hildan.krossbow.websocket.darwin.DarwinWebSocketClient | ||
|
||
class KtorDarwinWebSocketAutobahnTest : AutobahnClientTestSuite("krossbow-darwin-client-${Platform.osFamily.name.lowercase()}") { | ||
|
||
override fun provideClient(): WebSocketClient = KtorWebSocketClient(HttpClient(Darwin) { install(WebSockets) }) | ||
} |
6 changes: 6 additions & 0 deletions
6
...rc/darwinTest/kotlin/org/hildan/krossbow/websocket/test/autobahn/AutobahnReportsDarwin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package org.hildan.krossbow.websocket.test.autobahn | ||
|
||
import io.ktor.client.engine.* | ||
import io.ktor.client.engine.darwin.* | ||
|
||
actual fun ktorEngine(): HttpClientEngineFactory<*> = Darwin |
6 changes: 6 additions & 0 deletions
6
...4Test/kotlin/org.hildan.krossbow.websocket.test.autobahn/AutobahnReportsNativeLinuxX64.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package org.hildan.krossbow.websocket.test.autobahn | ||
|
||
import io.ktor.client.engine.* | ||
import io.ktor.client.engine.cio.* | ||
|
||
actual fun ktorEngine(): HttpClientEngineFactory<*> = CIO |
6 changes: 6 additions & 0 deletions
6
...64Test/kotlin/org/hildan/krossbow/websocket/test/autobahn/AutobahnReportsNativeMingw64.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package org.hildan.krossbow.websocket.test.autobahn | ||
|
||
import io.ktor.client.engine.* | ||
import io.ktor.client.engine.curl.* | ||
|
||
actual fun ktorEngine(): HttpClientEngineFactory<*> = Curl |
14 changes: 14 additions & 0 deletions
14
...4Test/kotlin/org/hildan/krossbow/websocket/test/autobahn/KtorCurlWebSocketAutobahnTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.hildan.krossbow.websocket.test.autobahn.org.hildan.krossbow.websocket.test.autobahn | ||
|
||
import io.ktor.client.* | ||
import io.ktor.client.engine.curl.* | ||
import io.ktor.client.plugins.websocket.* | ||
import org.hildan.krossbow.websocket.WebSocketClient | ||
import org.hildan.krossbow.websocket.ktor.KtorWebSocketClient | ||
import org.hildan.krossbow.websocket.test.autobahn.AutobahnClientTestSuite | ||
|
||
class KtorCurlWebSocketAutobahnTest : AutobahnClientTestSuite( | ||
agentUnderTest = "krossbow-ktor-curl-client-${Platform.osFamily.name.lowercase()}", | ||
) { | ||
override fun provideClient(): WebSocketClient = KtorWebSocketClient(HttpClient(Curl) { install(WebSockets) }) | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...ixTest/kotlin/org/hildan/krossbow/websocket/test/autobahn/KtorCioWebSocketAutobahnTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.hildan.krossbow.websocket.test.autobahn | ||
|
||
import io.ktor.client.* | ||
import io.ktor.client.engine.cio.* | ||
import io.ktor.client.plugins.websocket.* | ||
import org.hildan.krossbow.websocket.WebSocketClient | ||
import org.hildan.krossbow.websocket.ktor.KtorWebSocketClient | ||
|
||
class KtorCioWebSocketAutobahnTest : AutobahnClientTestSuite( | ||
agentUnderTest = "krossbow-ktor-cio-client-${Platform.osFamily.name.lowercase()}", | ||
exclusions = listOf( | ||
CaseExclusion( | ||
caseIdPrefixes = listOf("2.5"), | ||
reason = "CIO is more lenient than the spec, and accept pings > 125 bytes", | ||
), | ||
CaseExclusion( | ||
caseIdPrefixes = listOf("3.1", "3.2", "3.3", "3.4", "3.5", "3.6"), | ||
reason = "CIO is more lenient than the spec, and doesn't fail on non-negotiated RSV != 0", | ||
), | ||
CaseExclusion( | ||
caseIdPrefixes = listOf("5.1"), | ||
reason = "CIO is more lenient than the spec, and doesn't fail on fragmented pings", | ||
), | ||
// FIXME this is not critical but should be investigated | ||
CaseExclusion( | ||
caseIdPrefixes = listOf("5.7"), | ||
reason = "wrong ordering in case of mixed pings with fragmented messages", | ||
), | ||
), | ||
) { | ||
override fun provideClient(): WebSocketClient = KtorWebSocketClient(HttpClient(CIO) { install(WebSockets) }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.