More complete ping test
This commit is contained in:
parent
c62296edec
commit
06694cc0fb
@ -11,6 +11,7 @@ import org.junit.Assert
|
|||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
class PingTest : BaseTest() {
|
class PingTest : BaseTest() {
|
||||||
|
val counter = atomic(0)
|
||||||
@Test
|
@Test
|
||||||
fun RmiPing() {
|
fun RmiPing() {
|
||||||
setLogLevel(Level.TRACE)
|
setLogLevel(Level.TRACE)
|
||||||
@ -35,9 +36,10 @@ class PingTest : BaseTest() {
|
|||||||
repeat(100) {
|
repeat(100) {
|
||||||
ping {
|
ping {
|
||||||
// a ping object is returned, once the round-trip is complete
|
// a ping object is returned, once the round-trip is complete
|
||||||
println(it)
|
val count = counter.getAndIncrement()
|
||||||
|
println(count)
|
||||||
|
|
||||||
if (it == 99) {
|
if (count == 99) {
|
||||||
clientSuccess.value = true
|
clientSuccess.value = true
|
||||||
|
|
||||||
logger.error("out-bound: $outbound")
|
logger.error("out-bound: $outbound")
|
||||||
@ -53,7 +55,7 @@ class PingTest : BaseTest() {
|
|||||||
client.connect(LOCALHOST)
|
client.connect(LOCALHOST)
|
||||||
}
|
}
|
||||||
|
|
||||||
waitForThreads()
|
waitForThreads(500)
|
||||||
|
|
||||||
Assert.assertTrue(clientSuccess.value)
|
Assert.assertTrue(clientSuccess.value)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user