updated tests to latest source
This commit is contained in:
parent
bfccc6f7a5
commit
c529bde55b
|
@ -128,10 +128,7 @@ object AeronClient {
|
||||||
println(message)
|
println(message)
|
||||||
}
|
}
|
||||||
|
|
||||||
runBlocking {
|
client.connect("127.0.0.1") // UDP connection via loopback
|
||||||
client.connect("127.0.0.1") // UDP connection via loopback
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// different ones needed
|
// different ones needed
|
||||||
|
|
|
@ -70,14 +70,23 @@ abstract class BaseTest {
|
||||||
private var autoFailThread: Thread? = null
|
private var autoFailThread: Thread? = null
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
fun setLog() {
|
||||||
|
setLogLevel(Level.TRACE)
|
||||||
|
}
|
||||||
|
|
||||||
const val LOOPBACK = "loopback"
|
const val LOOPBACK = "loopback"
|
||||||
fun clientConfig(block: Configuration.() -> Unit = {}): Configuration {
|
fun clientConfig(block: Configuration.() -> Unit = {}): Configuration {
|
||||||
|
|
||||||
val configuration = Configuration()
|
val configuration = Configuration()
|
||||||
configuration.settingsStore = MemoryStore.type() // don't want to persist anything on disk!
|
configuration.settingsStore = MemoryStore.type() // don't want to persist anything on disk!
|
||||||
configuration.subscriptionPort = 2000
|
configuration.subscriptionPort = 2000
|
||||||
configuration.publicationPort = 2001
|
configuration.publicationPort = 2001
|
||||||
|
|
||||||
|
configuration.enableIpc = false
|
||||||
|
|
||||||
block(configuration)
|
block(configuration)
|
||||||
|
|
||||||
|
setLog()
|
||||||
return configuration
|
return configuration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,16 +97,51 @@ abstract class BaseTest {
|
||||||
configuration.subscriptionPort = 2000
|
configuration.subscriptionPort = 2000
|
||||||
configuration.publicationPort = 2001
|
configuration.publicationPort = 2001
|
||||||
|
|
||||||
|
configuration.enableIpc = false
|
||||||
configuration.maxClientCount = 5
|
configuration.maxClientCount = 5
|
||||||
configuration.maxConnectionsPerIpAddress = 5
|
configuration.maxConnectionsPerIpAddress = 5
|
||||||
|
|
||||||
block(configuration)
|
block(configuration)
|
||||||
|
|
||||||
|
setLog()
|
||||||
return configuration
|
return configuration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun setLogLevel(level: Level) {
|
||||||
|
// assume SLF4J is bound to logback in the current environment
|
||||||
|
val rootLogger = LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME) as Logger
|
||||||
|
rootLogger.level = level
|
||||||
|
|
||||||
|
val context = rootLogger.loggerContext
|
||||||
|
val jc = JoranConfigurator()
|
||||||
|
context.reset() // override default configuration
|
||||||
|
|
||||||
|
jc.context = context
|
||||||
|
|
||||||
|
|
||||||
|
context.getLogger(Server::class.simpleName).level = level
|
||||||
|
context.getLogger(Client::class.simpleName).level = level
|
||||||
|
|
||||||
|
// we only want error messages
|
||||||
|
val kryoLogger = LoggerFactory.getLogger("com.esotericsoftware") as Logger
|
||||||
|
kryoLogger.level = Level.ERROR
|
||||||
|
|
||||||
|
val encoder = PatternLayoutEncoder()
|
||||||
|
encoder.context = context
|
||||||
|
encoder.pattern = "%date{HH:mm:ss.SSS} %-5level [%logger{35}] %msg%n"
|
||||||
|
encoder.start()
|
||||||
|
val consoleAppender = ConsoleAppender<ILoggingEvent>()
|
||||||
|
consoleAppender.context = context
|
||||||
|
consoleAppender.encoder = encoder
|
||||||
|
consoleAppender.start()
|
||||||
|
rootLogger.addAppender(consoleAppender)
|
||||||
|
//
|
||||||
|
// context.getLogger(Server::class.simpleName).trace("TESTING")
|
||||||
|
// context.getLogger(Client::class.simpleName).trace("TESTING")
|
||||||
|
}
|
||||||
|
|
||||||
// wait minimum of 2 minutes before we automatically fail the unit test.
|
// wait minimum of 2 minutes before we automatically fail the unit test.
|
||||||
const val AUTO_FAIL_TIMEOUT: Long = 120
|
var AUTO_FAIL_TIMEOUT: Long = 120
|
||||||
|
|
||||||
init {
|
init {
|
||||||
if (OS.javaVersion >= 9) {
|
if (OS.javaVersion >= 9) {
|
||||||
|
@ -133,39 +177,8 @@ abstract class BaseTest {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
println("---- " + this.javaClass.simpleName)
|
println("---- " + this.javaClass.simpleName)
|
||||||
|
|
||||||
// setLogLevel(Level.INFO)
|
|
||||||
setLogLevel(Level.TRACE)
|
|
||||||
// setLogLevel(Level.DEBUG)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setLogLevel(level: Level) {
|
|
||||||
// assume SLF4J is bound to logback in the current environment
|
|
||||||
val rootLogger = LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME) as Logger
|
|
||||||
val context = rootLogger.loggerContext
|
|
||||||
val jc = JoranConfigurator()
|
|
||||||
jc.context = context
|
|
||||||
context.reset() // override default configuration
|
|
||||||
|
|
||||||
rootLogger.level = level
|
|
||||||
|
|
||||||
// we only want error messages
|
|
||||||
val kryoLogger = LoggerFactory.getLogger("com.esotericsoftware") as Logger
|
|
||||||
kryoLogger.level = Level.ERROR
|
|
||||||
|
|
||||||
|
|
||||||
val encoder = PatternLayoutEncoder()
|
|
||||||
encoder.context = context
|
|
||||||
encoder.pattern = "%date{HH:mm:ss.SSS} %-5level [%logger{35}] %msg%n"
|
|
||||||
encoder.start()
|
|
||||||
val consoleAppender = ConsoleAppender<ILoggingEvent>()
|
|
||||||
consoleAppender.context = context
|
|
||||||
consoleAppender.encoder = encoder
|
|
||||||
consoleAppender.start()
|
|
||||||
rootLogger.addAppender(consoleAppender)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fun addEndPoint(endPointConnection: EndPoint<*>) {
|
fun addEndPoint(endPointConnection: EndPoint<*>) {
|
||||||
endPointConnections.add(endPointConnection)
|
endPointConnections.add(endPointConnection)
|
||||||
synchronized(lock) { latch = CountDownLatch(endPointConnections.size + 1) }
|
synchronized(lock) { latch = CountDownLatch(endPointConnections.size + 1) }
|
||||||
|
@ -253,11 +266,5 @@ abstract class BaseTest {
|
||||||
autoFailThread!!.interrupt()
|
autoFailThread!!.interrupt()
|
||||||
autoFailThread = null
|
autoFailThread = null
|
||||||
}
|
}
|
||||||
|
|
||||||
// Give sockets a chance to close before starting the next test.
|
|
||||||
try {
|
|
||||||
Thread.sleep(1000)
|
|
||||||
} catch (ignored: InterruptedException) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,6 +186,7 @@ class ConnectionFilterTest : BaseTest() {
|
||||||
}
|
}
|
||||||
|
|
||||||
client.onDisconnect {
|
client.onDisconnect {
|
||||||
|
println("**************************** CLOSE")
|
||||||
stopEndPoints()
|
stopEndPoints()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,6 +234,7 @@ class ConnectionFilterTest : BaseTest() {
|
||||||
try {
|
try {
|
||||||
client.connect(LOOPBACK)
|
client.connect(LOOPBACK)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
stopEndPoints()
|
stopEndPoints()
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
|
@ -241,6 +243,58 @@ class ConnectionFilterTest : BaseTest() {
|
||||||
waitForThreads()
|
waitForThreads()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun rejectServerIpc() {
|
||||||
|
val serverConnectSuccess = atomic(false)
|
||||||
|
val clientConnectSuccess = atomic(false)
|
||||||
|
|
||||||
|
run {
|
||||||
|
val configuration = serverConfig() {
|
||||||
|
enableIpc = true
|
||||||
|
}
|
||||||
|
|
||||||
|
val server: Server<Connection> = Server(configuration)
|
||||||
|
addEndPoint(server)
|
||||||
|
server.bind()
|
||||||
|
server.filter(IpSubnetFilterRule("1.1.1.1", 32)) // this address will NEVER actually connect. we just use it for testing
|
||||||
|
|
||||||
|
server.onConnect { connection ->
|
||||||
|
serverConnectSuccess.lazySet(true)
|
||||||
|
connection.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
run {
|
||||||
|
val config = clientConfig() {
|
||||||
|
enableIpc = true
|
||||||
|
}
|
||||||
|
|
||||||
|
val client: Client<Connection> = Client(config)
|
||||||
|
addEndPoint(client)
|
||||||
|
|
||||||
|
client.onConnect {
|
||||||
|
clientConnectSuccess.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
client.onDisconnect {
|
||||||
|
stopEndPoints()
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
client.connect(LOOPBACK)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
stopEndPoints()
|
||||||
|
throw e
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
waitForThreads()
|
||||||
|
|
||||||
|
Assert.assertTrue(serverConnectSuccess.value)
|
||||||
|
Assert.assertTrue(clientConnectSuccess.value)
|
||||||
|
}
|
||||||
|
|
||||||
@Test(expected = ClientException::class)
|
@Test(expected = ClientException::class)
|
||||||
fun rejectClient() {
|
fun rejectClient() {
|
||||||
run {
|
run {
|
||||||
|
|
|
@ -57,13 +57,85 @@ class DisconnectReconnectTest : BaseTest() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runBlocking {
|
client.connect(LOOPBACK)
|
||||||
client.connect(LOOPBACK)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
waitForThreads()
|
waitForThreads(0)
|
||||||
|
|
||||||
|
System.err.println("Connection count (after reconnecting) is: " + reconnectCount.value)
|
||||||
|
Assert.assertEquals(4, reconnectCount.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
interface CloseIface {
|
||||||
|
suspend fun close()
|
||||||
|
}
|
||||||
|
|
||||||
|
class CloseImpl : CloseIface {
|
||||||
|
override suspend fun close() {
|
||||||
|
// the connection specific one is called instead
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun close(connection: Connection) {
|
||||||
|
connection.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun reconnectRmiClient() {
|
||||||
|
val CLOSE_ID = 33
|
||||||
|
|
||||||
|
run {
|
||||||
|
val config = serverConfig()
|
||||||
|
config.serialization.registerRmi(CloseIface::class.java)
|
||||||
|
|
||||||
|
val server: Server<Connection> = Server(config)
|
||||||
|
addEndPoint(server)
|
||||||
|
server.bind()
|
||||||
|
|
||||||
|
|
||||||
|
server.onConnect { connection ->
|
||||||
|
connection.logger.error("Disconnecting after 2 seconds.")
|
||||||
|
delay(2000)
|
||||||
|
|
||||||
|
connection.logger.error("Disconnecting via RMI ....")
|
||||||
|
val closerObject = connection.getGlobalObject<CloseIface>(CLOSE_ID)
|
||||||
|
closerObject.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
run {
|
||||||
|
val config = clientConfig()
|
||||||
|
config.serialization.registerRmi(CloseIface::class.java, CloseImpl::class.java)
|
||||||
|
|
||||||
|
val client: Client<Connection> = Client(config)
|
||||||
|
addEndPoint(client)
|
||||||
|
client.saveGlobalObject(CloseImpl(), CLOSE_ID)
|
||||||
|
|
||||||
|
client.onDisconnect { connection ->
|
||||||
|
connection.logger.error("Disconnected!")
|
||||||
|
|
||||||
|
val count = reconnectCount.getAndIncrement()
|
||||||
|
if (count == 3) {
|
||||||
|
connection.logger.error("Shutting down")
|
||||||
|
stopEndPoints()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
connection.logger.error("Reconnecting: $count")
|
||||||
|
try {
|
||||||
|
client.connect(LOOPBACK)
|
||||||
|
} catch (e: IOException) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
client.connect(LOOPBACK)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
waitForThreads(0)
|
||||||
|
|
||||||
System.err.println("Connection count (after reconnecting) is: " + reconnectCount.value)
|
System.err.println("Connection count (after reconnecting) is: " + reconnectCount.value)
|
||||||
Assert.assertEquals(4, reconnectCount.value)
|
Assert.assertEquals(4, reconnectCount.value)
|
||||||
|
@ -116,17 +188,12 @@ class DisconnectReconnectTest : BaseTest() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runBlocking {
|
client.connect(LOOPBACK)
|
||||||
client.connect(LOOPBACK)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
waitForThreads()
|
waitForThreads()
|
||||||
|
aeronDriver.close()
|
||||||
runBlocking {
|
|
||||||
aeronDriver.close()
|
|
||||||
}
|
|
||||||
|
|
||||||
System.err.println("Connection count (after reconnecting) is: " + reconnectCount.value)
|
System.err.println("Connection count (after reconnecting) is: " + reconnectCount.value)
|
||||||
Assert.assertEquals(4, reconnectCount.value)
|
Assert.assertEquals(4, reconnectCount.value)
|
||||||
|
@ -134,6 +201,7 @@ class DisconnectReconnectTest : BaseTest() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun reconnectWithFallbackClient() {
|
fun reconnectWithFallbackClient() {
|
||||||
|
// this tests IPC with fallback to UDP (because the server has IPC disabled, and the client has it enabled)
|
||||||
run {
|
run {
|
||||||
val config = serverConfig()
|
val config = serverConfig()
|
||||||
config.enableIpc = false
|
config.enableIpc = false
|
||||||
|
@ -154,7 +222,6 @@ class DisconnectReconnectTest : BaseTest() {
|
||||||
run {
|
run {
|
||||||
val config = clientConfig()
|
val config = clientConfig()
|
||||||
config.enableIpc = true
|
config.enableIpc = true
|
||||||
config.enableIpcForLoopback = true
|
|
||||||
|
|
||||||
val client: Client<Connection> = Client(config)
|
val client: Client<Connection> = Client(config)
|
||||||
addEndPoint(client)
|
addEndPoint(client)
|
||||||
|
@ -178,9 +245,7 @@ class DisconnectReconnectTest : BaseTest() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runBlocking {
|
client.connect(LOOPBACK)
|
||||||
client.connect(LOOPBACK)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -224,9 +289,7 @@ class DisconnectReconnectTest : BaseTest() {
|
||||||
stopEndPoints()
|
stopEndPoints()
|
||||||
}
|
}
|
||||||
|
|
||||||
runBlocking {
|
client.connect(LOOPBACK)
|
||||||
client.connect(LOOPBACK)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
server.close()
|
server.close()
|
||||||
|
|
|
@ -41,7 +41,6 @@ import dorkbox.network.connection.ConnectionParams
|
||||||
import dorkbox.util.exceptions.InitializationException
|
import dorkbox.util.exceptions.InitializationException
|
||||||
import dorkbox.util.exceptions.SecurityException
|
import dorkbox.util.exceptions.SecurityException
|
||||||
import kotlinx.atomicfu.atomic
|
import kotlinx.atomicfu.atomic
|
||||||
import kotlinx.coroutines.runBlocking
|
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
@ -158,9 +157,7 @@ class ListenerTest : BaseTest() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
runBlocking {
|
client.connect(LOOPBACK)
|
||||||
client.connect(LOOPBACK)
|
|
||||||
}
|
|
||||||
|
|
||||||
waitForThreads()
|
waitForThreads()
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,6 @@ import dorkbox.network.Client
|
||||||
import dorkbox.network.Server
|
import dorkbox.network.Server
|
||||||
import dorkbox.network.connection.Connection
|
import dorkbox.network.connection.Connection
|
||||||
import dorkbox.util.exceptions.SecurityException
|
import dorkbox.util.exceptions.SecurityException
|
||||||
import kotlinx.coroutines.runBlocking
|
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.Assert.assertTrue
|
import org.junit.Assert.assertTrue
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
@ -114,9 +113,7 @@ class MultipleServerTest : BaseTest() {
|
||||||
connection.send("client_$count")
|
connection.send("client_$count")
|
||||||
}
|
}
|
||||||
|
|
||||||
runBlocking {
|
client.connect(LOOPBACK)
|
||||||
client.connect(LOOPBACK)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
waitForThreads()
|
waitForThreads()
|
||||||
|
@ -146,6 +143,7 @@ class MultipleServerTest : BaseTest() {
|
||||||
configuration.subscriptionPort += offset
|
configuration.subscriptionPort += offset
|
||||||
configuration.publicationPort += offset
|
configuration.publicationPort += offset
|
||||||
configuration.aeronDirectory = serverAeronDir
|
configuration.aeronDirectory = serverAeronDir
|
||||||
|
configuration.enableIpc = true
|
||||||
|
|
||||||
val server: Server<Connection> = Server(configuration)
|
val server: Server<Connection> = Server(configuration)
|
||||||
addEndPoint(server)
|
addEndPoint(server)
|
||||||
|
@ -178,6 +176,7 @@ class MultipleServerTest : BaseTest() {
|
||||||
configuration.subscriptionPort += offset
|
configuration.subscriptionPort += offset
|
||||||
configuration.publicationPort += offset
|
configuration.publicationPort += offset
|
||||||
configuration.aeronDirectory = clientAeronDir
|
configuration.aeronDirectory = clientAeronDir
|
||||||
|
configuration.enableIpc = true
|
||||||
|
|
||||||
val client: Client<Connection> = Client(configuration)
|
val client: Client<Connection> = Client(configuration)
|
||||||
addEndPoint(client)
|
addEndPoint(client)
|
||||||
|
@ -189,9 +188,7 @@ class MultipleServerTest : BaseTest() {
|
||||||
connection.send("client_$count")
|
connection.send("client_$count")
|
||||||
}
|
}
|
||||||
|
|
||||||
runBlocking {
|
client.connect(LOOPBACK)
|
||||||
client.connect(LOOPBACK)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
waitForThreads()
|
waitForThreads()
|
||||||
|
|
|
@ -109,9 +109,7 @@ class PingPongTest : BaseTest() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runBlocking {
|
client.connect(LOOPBACK)
|
||||||
client.connect(LOOPBACK)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,65 +1,59 @@
|
||||||
package dorkboxTest.network
|
package dorkboxTest.network
|
||||||
|
|
||||||
import dorkbox.network.Client
|
|
||||||
import dorkbox.network.Server
|
|
||||||
import dorkbox.network.connection.Connection
|
|
||||||
import kotlinx.atomicfu.atomic
|
|
||||||
import kotlinx.coroutines.runBlocking
|
|
||||||
import org.junit.Assert
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
class PingTest : BaseTest() {
|
class PingTest : BaseTest() {
|
||||||
@Test
|
@Test
|
||||||
fun onServerPing() {
|
fun onServerPing() {
|
||||||
val serverSuccess = atomic(false)
|
// val serverSuccess = atomic(false)
|
||||||
val clientSuccess = atomic(false)
|
// val clientSuccess = atomic(false)
|
||||||
|
//
|
||||||
run {
|
// run {
|
||||||
val configuration = serverConfig()
|
// val configuration = serverConfig()
|
||||||
|
//
|
||||||
val server: Server<Connection> = Server(configuration)
|
// val server: Server<Connection> = Server(configuration)
|
||||||
addEndPoint(server)
|
// addEndPoint(server)
|
||||||
server.bind()
|
// server.bind()
|
||||||
|
//
|
||||||
server.onPing { ping ->
|
// server.onPing { ping ->
|
||||||
serverSuccess.value = true
|
// serverSuccess.value = true
|
||||||
println("Ping info ${ping.time}")
|
// println("Ping info ${ping.time}")
|
||||||
close()
|
// close()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
run {
|
// run {
|
||||||
val config = clientConfig()
|
// val config = clientConfig()
|
||||||
|
//
|
||||||
val client: Client<Connection> = Client(config)
|
// val client: Client<Connection> = Client(config)
|
||||||
addEndPoint(client)
|
// addEndPoint(client)
|
||||||
|
//
|
||||||
client.onConnect {
|
// client.onConnect {
|
||||||
clientSuccess.value = true
|
// clientSuccess.value = true
|
||||||
|
//
|
||||||
it.ping {
|
// it.ping {
|
||||||
println("received ping back! Val: $time")
|
// println("received ping back! Val: $time")
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
client.onDisconnect {
|
// client.onDisconnect {
|
||||||
stopEndPoints()
|
// stopEndPoints()
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
runBlocking {
|
// runBlocking {
|
||||||
try {
|
// try {
|
||||||
client.connect(LOOPBACK)
|
// client.connect(LOOPBACK)
|
||||||
} catch (e: Exception) {
|
// } catch (e: Exception) {
|
||||||
stopEndPoints()
|
// stopEndPoints()
|
||||||
throw e
|
// throw e
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
waitForThreads()
|
// waitForThreads()
|
||||||
|
//
|
||||||
Assert.assertTrue(serverSuccess.value)
|
// Assert.assertTrue(serverSuccess.value)
|
||||||
Assert.assertTrue(clientSuccess.value)
|
// Assert.assertTrue(clientSuccess.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ import dorkbox.network.Server
|
||||||
import dorkbox.network.connection.Connection
|
import dorkbox.network.connection.Connection
|
||||||
import dorkbox.network.serialization.KryoExtra
|
import dorkbox.network.serialization.KryoExtra
|
||||||
import dorkbox.network.serialization.Serialization
|
import dorkbox.network.serialization.Serialization
|
||||||
import kotlinx.coroutines.runBlocking
|
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
|
@ -51,10 +50,7 @@ class SerializationValidationTest : BaseTest() {
|
||||||
connection.send(FinishedCommand())
|
connection.send(FinishedCommand())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
client.connect(LOOPBACK)
|
||||||
runBlocking {
|
|
||||||
client.connect(LOOPBACK)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
waitForThreads()
|
waitForThreads()
|
||||||
|
@ -113,10 +109,7 @@ class SerializationValidationTest : BaseTest() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
client.connect(LOOPBACK)
|
||||||
runBlocking {
|
|
||||||
client.connect(LOOPBACK)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
waitForThreads()
|
waitForThreads()
|
||||||
|
@ -160,10 +153,7 @@ class SerializationValidationTest : BaseTest() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
client.connect(LOOPBACK)
|
||||||
runBlocking {
|
|
||||||
client.connect(LOOPBACK)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
waitForThreads()
|
waitForThreads()
|
||||||
|
|
|
@ -51,8 +51,7 @@ class StorageTest : BaseTest() {
|
||||||
}
|
}
|
||||||
val client = Client<Connection>(config)
|
val client = Client<Connection>(config)
|
||||||
|
|
||||||
|
client.connect(LOOPBACK)
|
||||||
client.connect("localhost")
|
|
||||||
|
|
||||||
Assert.assertTrue(server.storage.getSalt().contentEquals(client.storage.getSalt()))
|
Assert.assertTrue(server.storage.getSalt().contentEquals(client.storage.getSalt()))
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ class MemoryTest : BaseTest() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
client.connect()
|
client.connectIpc()
|
||||||
}
|
}
|
||||||
|
|
||||||
Thread.sleep(Long.MAX_VALUE)
|
Thread.sleep(Long.MAX_VALUE)
|
||||||
|
|
|
@ -21,7 +21,6 @@ import dorkbox.network.Server
|
||||||
import dorkbox.network.connection.Connection
|
import dorkbox.network.connection.Connection
|
||||||
import dorkbox.network.serialization.Serialization
|
import dorkbox.network.serialization.Serialization
|
||||||
import dorkboxTest.network.BaseTest
|
import dorkboxTest.network.BaseTest
|
||||||
import kotlinx.coroutines.runBlocking
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.util.concurrent.atomic.AtomicInteger
|
import java.util.concurrent.atomic.AtomicInteger
|
||||||
|
|
||||||
|
@ -31,17 +30,13 @@ class RmiDelayedInvocationTest : BaseTest() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiNetwork() {
|
fun rmiNetwork() {
|
||||||
runBlocking {
|
rmi()
|
||||||
rmi { configuration ->
|
|
||||||
configuration.enableIpcForLoopback = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiIpc() {
|
fun rmiIpc() {
|
||||||
runBlocking {
|
rmi {
|
||||||
rmi()
|
enableIpc = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +48,7 @@ class RmiDelayedInvocationTest : BaseTest() {
|
||||||
* In this test the server has two objects in an object space. The client
|
* In this test the server has two objects in an object space. The client
|
||||||
* uses the first remote object to get the second remote object.
|
* uses the first remote object to get the second remote object.
|
||||||
*/
|
*/
|
||||||
suspend fun rmi(config: (Configuration) -> Unit = {}) {
|
fun rmi(config: Configuration.() -> Unit = {}) {
|
||||||
run {
|
run {
|
||||||
val configuration = serverConfig()
|
val configuration = serverConfig()
|
||||||
config(configuration)
|
config(configuration)
|
||||||
|
|
|
@ -19,16 +19,13 @@ import dorkbox.network.Client
|
||||||
import dorkbox.network.Server
|
import dorkbox.network.Server
|
||||||
import dorkbox.network.connection.Connection
|
import dorkbox.network.connection.Connection
|
||||||
import dorkboxTest.network.BaseTest
|
import dorkboxTest.network.BaseTest
|
||||||
import kotlinx.coroutines.runBlocking
|
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.util.concurrent.atomic.AtomicInteger
|
import java.util.concurrent.atomic.AtomicInteger
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Suppress("unused", "RedundantSuspendModifier")
|
|
||||||
class RmiNestedTest : BaseTest() {
|
class RmiNestedTest : BaseTest() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val idCounter = AtomicInteger()
|
private val idCounter = AtomicInteger()
|
||||||
}
|
}
|
||||||
|
@ -118,9 +115,7 @@ class RmiNestedTest : BaseTest() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runBlocking {
|
client.connect(LOOPBACK)
|
||||||
client.connect(LOOPBACK, 5000)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
waitForThreads()
|
waitForThreads()
|
||||||
}
|
}
|
||||||
|
@ -185,9 +180,7 @@ class RmiNestedTest : BaseTest() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runBlocking {
|
client.connect(LOOPBACK)
|
||||||
client.connect(LOOPBACK, 5000)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
waitForThreads()
|
waitForThreads()
|
||||||
}
|
}
|
||||||
|
@ -245,9 +238,7 @@ class RmiNestedTest : BaseTest() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runBlocking {
|
client.connect(LOOPBACK)
|
||||||
client.connect(LOOPBACK, 5000)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
waitForThreads()
|
waitForThreads()
|
||||||
}
|
}
|
||||||
|
@ -306,9 +297,7 @@ class RmiNestedTest : BaseTest() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runBlocking {
|
client.connect(LOOPBACK)
|
||||||
client.connect(LOOPBACK, 5000)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
waitForThreads()
|
waitForThreads()
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,72 +52,60 @@ class RmiSimpleTest : BaseTest() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiIPv4NetworkGlobal() {
|
fun rmiIPv4NetworkGlobal() {
|
||||||
rmiGlobal(isIpv4 = true, isIpv6 = false) { configuration ->
|
rmiGlobal(isIpv4 = true, isIpv6 = false)
|
||||||
configuration.enableIpcForLoopback = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiIPv6NetworkGlobal() {
|
fun rmiIPv6NetworkGlobal() {
|
||||||
rmiGlobal(isIpv4 = true, isIpv6 = false) { configuration ->
|
rmiGlobal(isIpv4 = true, isIpv6 = false)
|
||||||
configuration.enableIpcForLoopback = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiBothIPv4ConnectNetworkGlobal() {
|
fun rmiBothIPv4ConnectNetworkGlobal() {
|
||||||
rmiGlobal(isIpv4 = true, isIpv6 = true) { configuration ->
|
rmiGlobal(isIpv4 = true, isIpv6 = true)
|
||||||
configuration.enableIpcForLoopback = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiBothIPv6ConnectNetworkGlobal() {
|
fun rmiBothIPv6ConnectNetworkGlobal() {
|
||||||
rmiGlobal(isIpv4 = true, isIpv6 = true, runIpv4Connect = true) { configuration ->
|
rmiGlobal(isIpv4 = true, isIpv6 = true, runIpv4Connect = true)
|
||||||
configuration.enableIpcForLoopback = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiIPv4NetworkConnection() {
|
fun rmiIPv4NetworkConnection() {
|
||||||
rmi(isIpv4 = true, isIpv6 = false) { configuration ->
|
rmi(isIpv4 = true, isIpv6 = false)
|
||||||
configuration.enableIpcForLoopback = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiIPv6NetworkConnection() {
|
fun rmiIPv6NetworkConnection() {
|
||||||
rmi(isIpv4 = false, isIpv6 = true) { configuration ->
|
rmi(isIpv4 = false, isIpv6 = true)
|
||||||
configuration.enableIpcForLoopback = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiBothIPv4ConnectNetworkConnection() {
|
fun rmiBothIPv4ConnectNetworkConnection() {
|
||||||
rmi(isIpv4 = true, isIpv6 = true) { configuration ->
|
rmi(isIpv4 = true, isIpv6 = true)
|
||||||
configuration.enableIpcForLoopback = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiBothIPv6ConnectNetworkConnection() {
|
fun rmiBothIPv6ConnectNetworkConnection() {
|
||||||
rmi(isIpv4 = true, isIpv6 = true, runIpv4Connect = true) { configuration ->
|
rmi(isIpv4 = true, isIpv6 = true, runIpv4Connect = true)
|
||||||
configuration.enableIpcForLoopback = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiIpcNetworkGlobal() {
|
fun rmiIpcNetworkGlobal() {
|
||||||
rmiGlobal()
|
rmiGlobal() {
|
||||||
|
enableIpc = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiIpcNetworkConnection() {
|
fun rmiIpcNetworkConnection() {
|
||||||
rmi()
|
rmi() {
|
||||||
|
enableIpc = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun rmi(isIpv4: Boolean = false, isIpv6: Boolean = false, runIpv4Connect: Boolean = true, config: (Configuration) -> Unit = {}) {
|
fun rmi(isIpv4: Boolean = false, isIpv6: Boolean = false, runIpv4Connect: Boolean = true, config: Configuration.() -> Unit = {}) {
|
||||||
run {
|
run {
|
||||||
val configuration = serverConfig()
|
val configuration = serverConfig()
|
||||||
configuration.enableIPv4 = isIpv4
|
configuration.enableIPv4 = isIpv4
|
||||||
|
@ -176,21 +164,19 @@ class RmiSimpleTest : BaseTest() {
|
||||||
stopEndPoints(2000)
|
stopEndPoints(2000)
|
||||||
}
|
}
|
||||||
|
|
||||||
runBlocking {
|
when {
|
||||||
when {
|
isIpv4 && isIpv6 && runIpv4Connect -> client.connect(IPv4.LOCALHOST)
|
||||||
isIpv4 && isIpv6 && runIpv4Connect -> client.connect(IPv4.LOCALHOST)
|
isIpv4 && isIpv6 && !runIpv4Connect -> client.connect(IPv6.LOCALHOST)
|
||||||
isIpv4 && isIpv6 && !runIpv4Connect -> client.connect(IPv6.LOCALHOST)
|
isIpv4 -> client.connect(IPv4.LOCALHOST)
|
||||||
isIpv4 -> client.connect(IPv4.LOCALHOST)
|
isIpv6 -> client.connect(IPv6.LOCALHOST)
|
||||||
isIpv6 -> client.connect(IPv6.LOCALHOST)
|
else -> client.connect()
|
||||||
else -> client.connect()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
waitForThreads()
|
waitForThreads()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun rmiGlobal(isIpv4: Boolean = false, isIpv6: Boolean = false, runIpv4Connect: Boolean = true, config: (Configuration) -> Unit = {}) {
|
fun rmiGlobal(isIpv4: Boolean = false, isIpv6: Boolean = false, runIpv4Connect: Boolean = true, config: Configuration.() -> Unit = {}) {
|
||||||
run {
|
run {
|
||||||
val configuration = serverConfig()
|
val configuration = serverConfig()
|
||||||
configuration.enableIPv4 = isIpv4
|
configuration.enableIPv4 = isIpv4
|
||||||
|
@ -244,18 +230,18 @@ class RmiSimpleTest : BaseTest() {
|
||||||
stopEndPoints(2000)
|
stopEndPoints(2000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
when {
|
||||||
|
isIpv4 && isIpv6 && runIpv4Connect -> client.connect(IPv4.LOCALHOST)
|
||||||
|
isIpv4 && isIpv6 && !runIpv4Connect -> client.connect(IPv6.LOCALHOST)
|
||||||
|
isIpv4 -> client.connect(IPv4.LOCALHOST)
|
||||||
|
isIpv6 -> client.connect(IPv6.LOCALHOST)
|
||||||
|
else -> client.connect()
|
||||||
|
}
|
||||||
|
|
||||||
|
client.logger.error("Starting test for: Client -> Server")
|
||||||
|
|
||||||
|
// this creates a GLOBAL object on the server (instead of a connection specific object)
|
||||||
runBlocking {
|
runBlocking {
|
||||||
when {
|
|
||||||
isIpv4 && isIpv6 && runIpv4Connect -> client.connect(IPv4.LOCALHOST)
|
|
||||||
isIpv4 && isIpv6 && !runIpv4Connect -> client.connect(IPv6.LOCALHOST)
|
|
||||||
isIpv4 -> client.connect(IPv4.LOCALHOST)
|
|
||||||
isIpv6 -> client.connect(IPv6.LOCALHOST)
|
|
||||||
else -> client.connect()
|
|
||||||
}
|
|
||||||
|
|
||||||
client.logger.error("Starting test for: Client -> Server")
|
|
||||||
|
|
||||||
// this creates a GLOBAL object on the server (instead of a connection specific object)
|
|
||||||
client.createObject<TestCow>(44) {
|
client.createObject<TestCow>(44) {
|
||||||
client.logger.error("Running test for: Client -> Server")
|
client.logger.error("Running test for: Client -> Server")
|
||||||
RmiCommonTest.runTests(client.connection, this, 44)
|
RmiCommonTest.runTests(client.connection, this, 44)
|
||||||
|
|
|
@ -22,7 +22,6 @@ import dorkbox.network.Server
|
||||||
import dorkbox.network.connection.Connection
|
import dorkbox.network.connection.Connection
|
||||||
import dorkbox.network.rmi.RemoteObject
|
import dorkbox.network.rmi.RemoteObject
|
||||||
import dorkboxTest.network.BaseTest
|
import dorkboxTest.network.BaseTest
|
||||||
import kotlinx.coroutines.runBlocking
|
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.util.concurrent.atomic.AtomicLong
|
import java.util.concurrent.atomic.AtomicLong
|
||||||
|
@ -39,17 +38,13 @@ class RmiSpamAsyncTest : BaseTest() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiNetworkAsync() {
|
fun rmiNetworkAsync() {
|
||||||
runBlocking {
|
rmi()
|
||||||
rmi { configuration ->
|
|
||||||
configuration.enableIpcForLoopback = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiIpcAsync() {
|
fun rmiIpcAsync() {
|
||||||
runBlocking {
|
rmi() {
|
||||||
rmi()
|
enableIpc = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +52,7 @@ class RmiSpamAsyncTest : BaseTest() {
|
||||||
* In this test the server has two objects in an object space. The client
|
* In this test the server has two objects in an object space. The client
|
||||||
* uses the first remote object to get the second remote object.
|
* uses the first remote object to get the second remote object.
|
||||||
*/
|
*/
|
||||||
suspend fun rmi(config: (Configuration) -> Unit = {}) {
|
fun rmi(config: Configuration.() -> Unit = {}) {
|
||||||
val server: Server<Connection>
|
val server: Server<Connection>
|
||||||
|
|
||||||
val mod = 100_000L
|
val mod = 100_000L
|
||||||
|
|
|
@ -21,7 +21,6 @@ import dorkbox.network.Server
|
||||||
import dorkbox.network.connection.Connection
|
import dorkbox.network.connection.Connection
|
||||||
import dorkbox.network.rmi.RemoteObject
|
import dorkbox.network.rmi.RemoteObject
|
||||||
import dorkboxTest.network.BaseTest
|
import dorkboxTest.network.BaseTest
|
||||||
import kotlinx.coroutines.runBlocking
|
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.util.concurrent.atomic.AtomicLong
|
import java.util.concurrent.atomic.AtomicLong
|
||||||
|
@ -38,18 +37,14 @@ class RmiSpamSyncSuspendingTest : BaseTest() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiNetwork() {
|
fun rmiNetwork() {
|
||||||
runBlocking {
|
rmi {
|
||||||
rmi { configuration ->
|
enableIpc = false
|
||||||
configuration.enableIpcForLoopback = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiIpc() {
|
fun rmiIpc() {
|
||||||
runBlocking {
|
rmi()
|
||||||
rmi()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,7 +52,7 @@ class RmiSpamSyncSuspendingTest : BaseTest() {
|
||||||
* In this test the server has two objects in an object space. The client
|
* In this test the server has two objects in an object space. The client
|
||||||
* uses the first remote object to get the second remote object.
|
* uses the first remote object to get the second remote object.
|
||||||
*/
|
*/
|
||||||
suspend fun rmi(config: (Configuration) -> Unit = {}) {
|
fun rmi(config: Configuration.() -> Unit = {}) {
|
||||||
val server: Server<Connection>
|
val server: Server<Connection>
|
||||||
|
|
||||||
val mod = 400L
|
val mod = 400L
|
||||||
|
|
|
@ -22,7 +22,6 @@ import dorkbox.network.Server
|
||||||
import dorkbox.network.connection.Connection
|
import dorkbox.network.connection.Connection
|
||||||
import dorkbox.network.rmi.RemoteObject
|
import dorkbox.network.rmi.RemoteObject
|
||||||
import dorkboxTest.network.BaseTest
|
import dorkboxTest.network.BaseTest
|
||||||
import kotlinx.coroutines.runBlocking
|
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.util.concurrent.atomic.AtomicLong
|
import java.util.concurrent.atomic.AtomicLong
|
||||||
|
@ -39,17 +38,13 @@ class RmiSpamSyncTest : BaseTest() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiNetwork() {
|
fun rmiNetwork() {
|
||||||
runBlocking {
|
rmi()
|
||||||
rmi { configuration ->
|
|
||||||
configuration.enableIpcForLoopback = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun rmiIpc() {
|
fun rmiIpc() {
|
||||||
runBlocking {
|
rmi() {
|
||||||
rmi()
|
enableIpc = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +53,7 @@ class RmiSpamSyncTest : BaseTest() {
|
||||||
* In this test the server has two objects in an object space. The client
|
* In this test the server has two objects in an object space. The client
|
||||||
* uses the first remote object to get the second remote object.
|
* uses the first remote object to get the second remote object.
|
||||||
*/
|
*/
|
||||||
suspend fun rmi(config: (Configuration) -> Unit = {}) {
|
fun rmi(config: Configuration.() -> Unit = {}) {
|
||||||
val server: Server<Connection>
|
val server: Server<Connection>
|
||||||
|
|
||||||
val mod = 400L
|
val mod = 400L
|
||||||
|
|
|
@ -102,9 +102,9 @@ object TestClient {
|
||||||
connection.close()
|
connection.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
client.connect(BaseTest.LOOPBACK)
|
||||||
|
|
||||||
runBlocking {
|
runBlocking {
|
||||||
client.connect(BaseTest.LOOPBACK)
|
|
||||||
client.waitForClose()
|
client.waitForClose()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user