Replaced all uses of assert with require (#3309)

JVM assertions have to be enabled with the -ea flag so it's possible for these checks to be ignored.
This commit is contained in:
Shams Asari
2018-06-06 00:31:41 +01:00
committed by GitHub
parent 75f2c4a0a4
commit d620e71bb6
16 changed files with 65 additions and 64 deletions

View File

@ -91,7 +91,7 @@ class RPCStabilityTests {
// This is a less than check because threads from other tests may be shutting down while this test is running.
// This is therefore a "best effort" check. When this test is run on its own this should be a strict equality.
// In case of failure we output the threads along with their stacktraces to get an idea what was running at a time.
assert(threadsBefore.keys.size >= threadsAfter.keys.size, { "threadsBefore: $threadsBefore\nthreadsAfter: $threadsAfter" })
require(threadsBefore.keys.size >= threadsAfter.keys.size, { "threadsBefore: $threadsBefore\nthreadsAfter: $threadsAfter" })
} finally {
executor.shutdownNow()
}