Fixed logging for tests

This commit is contained in:
nathan 2020-09-03 15:01:42 +02:00
parent 3223e34619
commit 818687c0d8
3 changed files with 8 additions and 10 deletions

View File

@ -71,14 +71,14 @@ class MultipleServerTest : BaseTest() {
val server: Server<Connection> = Server(configuration)
addEndPoint(server)
server.onMessage<String>{ _, message ->
server.onMessage<String>{ connection, message ->
if (message != "client_$count") {
Assert.fail()
}
didReceive[count].set(true)
if (received.incrementAndGet() == total) {
println("Done, stopping endpoints")
connection.logger.error("Done, stopping endpoints")
stopEndPoints()
}
}

View File

@ -69,7 +69,7 @@ class PingPongTest : BaseTest() {
server.onConnect { connection ->
server.forEachConnection { connection ->
println("server connection: $connection")
connection.logger.error("server connection: $connection")
}
}
@ -88,7 +88,7 @@ class PingPongTest : BaseTest() {
client.onConnect { connection ->
client.forEachConnection { connection ->
println("client connection: $connection")
connection.logger.error("client connection: $connection")
}
fail = null
@ -105,8 +105,8 @@ class PingPongTest : BaseTest() {
if (counter.getAndIncrement() <= tries) {
connection.send(data)
} else {
System.err.println("done.")
System.err.println("Ran $tries times")
connection.logger.error("done.")
connection.logger.error("Ran $tries times")
stopEndPoints()
}
}

View File

@ -73,13 +73,12 @@ class RmiDelayedInvocationSpamTest : BaseTest() {
@Test
fun rmiNetworkAync() {
setupLogBefore()
runBlocking {
setupLogBefore()
async = true
rmi { configuration ->
configuration.enableIpcForLoopback = false
}
setupLogAfter()
}
}
@ -93,11 +92,10 @@ class RmiDelayedInvocationSpamTest : BaseTest() {
@Test
fun rmiIpcAsync() {
setupLogBefore()
runBlocking {
setupLogBefore()
async = true
rmi()
setupLogAfter()
}
}