rocketraman
07/27/2018, 9:14 PM@AfterEach
fun truncate() {
@Suppress("ConstantConditionIf")
if (doTeardown) {
runBlocking {
collection.truncate().await()
}
}
}
It fails with java.lang.ClassCastException: com.arangodb.entity.CollectionEntity cannot be cast to kotlin.Unit.
CollectionEntity is what is returned by collection.truncate().await() where await() is CompletionStage<T>.await(). I can make it work by doing runBlocking<Unit> {...} or commenting out the @Suppress annotation. Wtf?