sam
06/04/2020, 10:36 PMsam
06/06/2020, 4:37 PMLeoColman
06/06/2020, 8:01 PMsam
06/11/2020, 6:55 PMAshish Kumar Joy
06/12/2020, 1:11 PMsam
06/12/2020, 1:11 PMsam
06/12/2020, 1:12 PMsam
06/12/2020, 2:11 PMsam
06/12/2020, 2:23 PMAshish Kumar Joy
06/12/2020, 2:51 PMsam
06/12/2020, 2:51 PMsam
06/12/2020, 2:51 PMsam
06/12/2020, 3:05 PMsam
06/13/2020, 2:06 PMAshish Kumar Joy
06/17/2020, 3:53 PMsam
06/17/2020, 3:53 PMSerVB
06/17/2020, 7:04 PMcom.sksamuel.kotest.assertions.async.TimeoutTest
Test shouldTimeout should pass if a coroutine takes longer than the given timeout[jvm] FAILED
java.lang.AssertionError: Expected test to timeout for 5/MILLISECONDS
Caused by: java.lang.AssertionError: Expected test to timeout for 5/MILLISECONDS
Test shouldTimeout should fail if a coroutine finishes before the timeout[jvm] PASSED
Test executionError[jvm] FAILED
java.lang.AssertionError: Expected test to timeout for 5/MILLISECONDS
Caused by: java.lang.AssertionError: Expected test to timeout for 5/MILLISECONDS
Maybe they are blinky...sam
06/17/2020, 7:39 PMsam
06/19/2020, 1:27 PMsam
06/20/2020, 2:13 PMsam
06/20/2020, 2:13 PMsam
06/22/2020, 10:46 PMsam
06/23/2020, 2:27 AMsam
06/23/2020, 2:27 AMAshish Kumar Joy
07/11/2020, 5:52 PMinline fun <T> assertSoftly(assertions: () -> T): T
and the other with receiver object inline fun <T> T.assertSoftly(assertions: T.(T) -> Unit): T
currently any time a user uses assertSoftly .
assertSoftly {
1 shouldBe 1
}
It's always the second version with Spec class as receiver
even when user is not intended to use that version.
This is usually not a problem until user really want to use first version assertSoftly.
So i have this function.
fun <T> assertNextWith(publisher: Publisher<T>, first: (t: T) -> Unit, second: (t: T) -> Unit) {
StepVerifier.create(publisher)
.consumeNextWith(first)
.consumeNextWith(second)
.verifyComplete()
}
Its being used as shown in screenshot. Upto 4.0.5 version these tests were working fine, but on upgrading to 4.1.1 it start getting compilation error. As with earlier version of kotest it
was corresponding to the correctly to intented journey
but now with version upgrade it correspond to the spec class unintensionally.
I think we should change the signature of second version to
inline fun <T> assertSoftly(t: T, assertions: T.(T) -> Unit): T
Then its usage will be more explicit like this.
assertSoftly(person) {
name shouldBe "something"
}
sam
07/11/2020, 5:54 PMLeoColman
07/11/2020, 6:07 PMLeoColman
07/11/2020, 6:11 PMLeoColman
07/11/2020, 6:11 PM