Trying the new version - all the tests are failing...
# kotest-contributors
a
Trying the new version - all the tests are failing. Trying the first example on the page:
Copy code
class MyTests : StringSpec({
  "length should return size of string" {
    "hello".length shouldBe 5
  }
  "startsWith should test for a prefix" {
    "world" should startWith("wor")
  }
})
and getting
Copy code
kotlinx.coroutines.TimeoutKt.withTimeout-lwyi7ZQ(DLkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
java.lang.NoSuchMethodError: kotlinx.coroutines.TimeoutKt.withTimeout-lwyi7ZQ(DLkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
	at io.kotest.core.runtime.TestExecutor.executeAndWait(TestExecutor.kt:180)
	at io.kotest.core.runtime.TestExecutor.invokeTestCase(TestExecutor.kt:149)
	at io.kotest.core.runtime.TestExecutor.executeActiveTest(TestExecutor.kt:118)
	at io.kotest.core.runtime.TestExecutor$intercept$2.invokeSuspend(TestExecutor.kt:75)
	at io.kotest.core.runtime.TestExecutor$intercept$2.invoke(TestExecutor.kt)
	at io.kotest.core.runtime.TestExecutor.executeIfActive(TestExecutor.kt:87)
	at io.kotest.core.runtime.TestExecutor.intercept(TestExecutor.kt:75)
	at io.kotest.core.runtime.TestExecutor.execute(TestExecutor.kt:56)
	at io.kotest.core.engine.SingleInstanceSpecRunner.runTest(SingleInstanceSpecRunner.kt:59)
	at io.kotest.core.engine.SingleInstanceSpecRunner$execute$2$invokeSuspend$$inlined$invoke$lambda$1.invokeSuspend(SingleInstanceSpecRunner.kt:69)
	at io.kotest.core.engine.SingleInstanceSpecRunner$execute$2$invokeSuspend$$inlined$invoke$lambda$1.invoke(SingleInstanceSpecRunner.kt)
	at io.kotest.core.engine.SpecRunner$runParallel$$inlined$map$lambda$1$1.invokeSuspend(SpecRunner.kt:51)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:271)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:79)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:54)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at io.kotest.core.engine.SpecRunner$runParallel$$inlined$map$lambda$1.run(SpecRunner.kt:50)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Any idea…? Thank you
s
You're using kotlin 1.4?
a
Copy code
1.3.72
do I need 1.4?
s
Or an old version of coroutines
No 1.3.72 is good
a
we’re not using coroutine directly. let me check …
oh yes - <coroutines.version>1.3.5</coroutines.version>
should it be greater than this?
s
Seems ok but could try 1.3.7
And make sure something isn't bringjng in 1.2.x by mistake
👍 1
a
I made it work! It actually came from Kotest and you might want to change that. Had to exclude it and include it separately on it’s own dependency with version 1.3.7. Thank you so much for your support.
Copy code
<dependency>
            <groupId>io.kotest</groupId>
            <artifactId>kotest-runner-junit5-jvm</artifactId>
            <version>${kotest.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.jetbrains.kotlinx</groupId>
                    <artifactId>kotlinx-coroutines-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
s
hmmm interesting I'll check that out for RC2 thanks
😁 1
Which is now fixed in master and will be released in RC2
😁 1