diff --git a/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpServerTest.kt b/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpServerTest.kt index 732768b7..005f7811 100644 --- a/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpServerTest.kt +++ b/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpServerTest.kt @@ -25,7 +25,7 @@ import kotlin.test.* class TcpServerTest : SuspendTest { private val testJob = Job() private val testContext = testJob + TestExceptionHandler - private val serverTransport = KtorTcpServerTransport(testContext).target() + private val serverTransport = KtorTcpServerTransport(testContext).target("127.0.0.1") private fun KtorTcpServerInstance.clientTransport() = KtorTcpClientTransport(testContext).target(localAddress) diff --git a/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpTransportTest.kt b/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpTransportTest.kt index 72682ce3..1b2e9e1a 100644 --- a/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpTransportTest.kt +++ b/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpTransportTest.kt @@ -24,7 +24,7 @@ import kotlinx.coroutines.* @Suppress("DEPRECATION_ERROR") class TcpTransportTest : TransportTest() { override suspend fun before() { - val serverSocket = startServer(TcpServerTransport()).serverSocket.await() + val serverSocket = startServer(TcpServerTransport("127.0.0.1")).serverSocket.await() client = connectClient(TcpClientTransport(serverSocket.localAddress as InetSocketAddress, testContext)) } } @@ -36,7 +36,7 @@ class KtorTcpTransportTest : TransportTest() { override suspend fun before() { val server = startServer(KtorTcpServerTransport(testContext) { selectorManager(selector, false) - }.target()) + }.target("127.0.0.1")) client = connectClient(KtorTcpClientTransport(testContext) { selectorManager(selector, false) }.target(server.localAddress))