dave08
04/27/2021, 1:06 PMdave08
04/29/2021, 9:19 AMJerry Preissler
04/29/2021, 5:41 PMJosé González Gómez
04/30/2021, 11:27 AMkotest
and Android Studio
in a Kotlin multiplatform project. After adding the kotest
dependencies to build.gradle.kts
and reloading the project I get the following warning (not even an error):
Warning:<i><b>project ':partnerSDK': Unable to build Kotlin project configuration</b>
Details: org.gradle.internal.resolve.ArtifactNotFoundException: Could not find kotest-runner-junit5-4.4.3-samplessources.jar (io.kotest:kotest-runner-junit5:4.4.3).
Searched in the following locations:
<https://repo.maven.apache.org/maven2/io/kotest/kotest-runner-junit5/4.4.3/kotest-runner-junit5-4.4.3-samplessources.jar></i>
This seems to cause Android Studio
to stop working, and I'm no longer able to use code completion, or even run unit tests. This makes test creation extremely painful.
If I manually create a test I'm able to run it using ./gradlew test
, so this is clearly not a problem with my configuration or Gradle... Has anybody faced this problem? Do you know how to solve it?LeoColman
05/02/2021, 3:51 PMJosé González Gómez
05/03/2021, 7:45 AMkotest
in a Kotlin Multiplatform Mobile project? I have included the following dependencies in the shared project:
val kotestVersion = "4.4.0"
kotlin {
sourceSets {
val commonTest by getting {
dependencies {
implementation("io.kotest:kotest-runner-junit5:$kotestVersion")
implementation("io.kotest:kotest-assertions-core:$kotestVersion")
implementation("io.kotest:kotest-property:$kotestVersion")
}
}
}
}
but this fails when trying to build the project because there is no ios_x64
variant of kotest-runner-junit5
. Android Studio fails while reloading the project trying to find kotest-runner-junit5-4.4.0-samplessources.jar
and ./gradlew build
explicitly fails due to the missing ios_x64
variant not found.Mikhail Buzuverov
05/05/2021, 3:52 AMval commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
implementation("io.kotest:kotest-framework-engine:$kotestVersion") //<< This dependency
}
}
And wrote test:
class OperationResultSerializationTest: FunSpec({
val json = Json {
serializersModule = SerializersModule {
polymorphic(Any::class) {
subclass(TestPayload::class)
}
}
}
test("success action result should be serialized and deserialized") {
val actionSuccessJson = json.encodeToString<ActionResult>(ActionSuccess)
val actionSuccessDeserialized = json.decodeFromString<ActionResult>(actionSuccessJson)
actionSuccessDeserialized shouldBe null //<<Should FAIL here (intentionally)
}
})
But when I run it using gradlew check I get in IDEA just row:sam
05/05/2021, 1:27 PMAnimesh Sahu
05/08/2021, 4:44 PMlinuxArm32Hfp
, linuxMips32
, mingwX86
? Is it due to kx.coroutines does not support it? 👀huehnerlady
05/10/2021, 8:01 AMkotest-extensions-spring
is not released with 4.5.0 in maven-central?
https://mvnrepository.com/artifact/io.kotest/kotest-extensions-spring
I ran into the problem as I have a group-wide versioning and kotest-extensions-spring
cannot be found in 4.5.0 😅
Is that a separately released lib?wasyl
05/10/2021, 11:16 AM5 shouldBe "5"
. There’s no error shown, even though the signature would force the right-hand parameter to be a assignable to the left-hand one (infix fun <T, U : T> T.shouldBe(expected: U?)
), or so I thought. Is this expected?
It’s pretty annoying when refactoring code, because tests still compile but fail in runtimeJames Eschner
05/10/2021, 9:27 PMRuntime JAR files in the classpath should have the same version. These files were found in the classpath:
/Users/jameseschner/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.5.0/65fbc439df2e4aad1f3769762d54534f1b564090/kotlin-stdlib-jdk8-1.5.0.jar (version 1.5)
/Users/jameseschner/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.5.0/f61904618ea7be07a66e0545ffe8dc2c70a19b77/kotlin-stdlib-jdk7-1.5.0.jar (version 1.5)
/Users/jameseschner/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.0/29dae2501ca094416d15af0e21470cb634780444/kotlin-stdlib-1.5.0.jar (version 1.5)
/Users/jameseschner/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.5.0/4080d69efca5e39e9b4972f125e40f1607bd6460/kotlin-stdlib-common-1.5.0.jar (version 1.5)
/Users/jameseschner/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-script-runtime/1.4.31/183616b52cfb8ddaa8a2a15bf926e87dfcddcde3/kotlin-script-runtime-1.4.31.jar (version 1.4)
Looks like kotest is pulling in 1.4.31:
+--- io.kotest:kotest-runner-junit5 -> 4.5.0
| +--- io.kotest:kotest-framework-engine:4.5.0
| | \--- io.kotest:kotest-framework-engine-jvm:4.5.0
| | +--- org.jetbrains.kotlin:kotlin-script-runtime:1.4.31
Is kotest planning on moving to 1.5 soon?
* Not a Contribution *dave08
05/13/2021, 10:21 AMit("some test description")
without the trailing lambda, the test should pass? Why should that behaviour be needed? I would have thought that at least for TDD -- it should fail... I use this form just to outline the tests I need to write, but one might easily forget to implement them if they pass...dave08
05/13/2021, 10:24 AMwasyl
05/13/2021, 7:22 PMDescribeSpec({
describe("a") {
println("a")
describe("b") {
println("b")
it("check 1") { println("1") }
it("check 2") { println("2") }
}
describe("c") {
println("c")
it("check 1") { println("1") }
it("check 2") { println("2") }
}
}
})
to print
a // first instance
b
1
2
a // second instance
c
1
2
wasyl
05/14/2021, 12:29 PMwasyl
05/16/2021, 12:19 PMdetectConfig()
. Disabling jar scanning for it is not reasonable, because jars may provide listeners.
So while config discovery is pretty useful, would you consider some other mechanism for that? I know that scanning can be disabled, but then modules wouldn’t be able to provide useful listeners (I think I even requested discovery at one point, to avoid having to declare a merged project config in each module). One thing that comes to mind is allowing everything that can be AutoScanned now to be provided via ServiceLoaders. Locally I just hardcoded our listeners and got that peak memory down from 4GB to 1GB.
Bottom line: ClassGraph has significant memory impact, at least with larger projects. It’d be nice to have a way to completely bypass it. Btw in addition to memory usage, it also spawns several threads (in my case 18!) that it never releases.Jonathan Olsson
05/17/2021, 7:11 PMio.kotest:kotest-property
with stateful testing? 🙂christophsturm
05/18/2021, 11:42 AMdave08
05/18/2021, 1:31 PMdave08
05/18/2021, 1:56 PMentity1Id
as a parameter, or is there a better way?dave08
05/18/2021, 2:26 PMArb.set
or Arb.list
generates unique entries by my entity id?Gopal S Akshintala
05/19/2021, 7:53 AMSupertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class io.kotest.core.test.TestContext, unresolved supertypes: kotlinx.coroutines.CoroutineScope
Adding -Xextended-compiler-checks argument might provide additional information.
dave08
05/19/2021, 10:49 AMdave08
05/19/2021, 11:42 AMdave08
05/19/2021, 12:08 PMfun <A : Any> Arb.Companion.choose(a: Pair<Int, A>, b: Pair<Int, A>, vararg cs: Pair<Int, A>): Arb<A>
is A: Any
? It seems like it can't choose from a null?dave08
05/20/2021, 12:07 PMSourabh Rawat
05/21/2021, 8:11 AMNo qualifying bean of type 'org.lognet.springboot.grpc.autoconfigure.GRpcServerProperties'
What am I missing?Mark Allanson
05/21/2021, 9:33 AM@Mock
etc... annotations with `MockKAnnotations.init(this, relaxUnitFun = true)`` and haven't found a good way of doing it yet. I have been using BehaviourSpec
to implement the testsdave08
05/23/2021, 12:41 PMArb
as the actual arbitraries... maybe they should be in a CodePoint
companion object?dave08
05/23/2021, 12:41 PMArb
as the actual arbitraries... maybe they should be in a CodePoint
companion object?sam
05/23/2021, 12:45 PMdave08
05/23/2021, 12:46 PMsam
05/23/2021, 12:47 PMdave08
05/23/2021, 12:50 PMsam
05/23/2021, 12:51 PMdave08
05/23/2021, 12:51 PMsam
05/23/2021, 12:52 PMdave08
05/23/2021, 12:53 PMsam
05/23/2021, 12:54 PMdave08
05/23/2021, 12:59 PMsam
05/23/2021, 1:00 PMdave08
05/23/2021, 1:33 PMsam
05/23/2021, 1:34 PMdave08
05/23/2021, 1:35 PMsam
05/23/2021, 1:35 PMdave08
05/23/2021, 1:36 PMsam
05/23/2021, 1:38 PMdave08
05/23/2021, 2:30 PMa.codePoints()
?sam
05/23/2021, 2:51 PMdave08
05/23/2021, 2:51 PMsam
05/23/2021, 2:59 PM