Address comments #665

This commit is contained in:
Andras Slemmer
2017-05-11 11:32:29 +01:00
parent 8a17406246
commit b192a86a30
4 changed files with 8 additions and 8 deletions

View File

@ -46,7 +46,7 @@ class RPCStabilityTests {
values.poll()
}
val first = values.peek()
if (values.size == 5 && values.all { it == first } ) {
if (values.size == 5 && values.all { it == first }) {
first
} else {
null
@ -63,11 +63,11 @@ class RPCStabilityTests {
startRpcClient<RPCOps>(server.get().hostAndPort).get()
}
}
for (i in 1 .. 5) {
repeat(5) {
startAndStop()
}
val numberOfThreadsBefore = waitUntilNumberOfThreadsStable(executor)
for (i in 1 .. 5) {
repeat(5) {
startAndStop()
}
val numberOfThreadsAfter = waitUntilNumberOfThreadsStable(executor)
@ -87,11 +87,11 @@ class RPCStabilityTests {
ErrorOr.catch { startRpcClient<RPCOps>(server.get().hostAndPort, configuration = RPCClientConfiguration.default.copy(minimumServerProtocolVersion = 1)).get() }
}
}
for (i in 1 .. 5) {
repeat(5) {
startAndStop()
}
val numberOfThreadsBefore = waitUntilNumberOfThreadsStable(executor)
for (i in 1 .. 5) {
repeat(5) {
startAndStop()
}
val numberOfThreadsAfter = waitUntilNumberOfThreadsStable(executor)

View File

@ -281,7 +281,7 @@ class RPCClientProxyHandler(
// leak borrowed executors.
val observationExecutors = observationExecutorPool.close()
observationExecutors.forEach { it.shutdownNow() }
lifeCycle.transition(State.FINISHED)
lifeCycle.justTransition(State.FINISHED)
}
/**