dave08
07/01/2021, 3:30 PMabendt
07/01/2021, 6:04 PMsimon.vergauwen
07/06/2021, 11:35 AMTask arrow opticsjsLegacyBrowserTest
Disconnected (0 times) reconnect failed before timeout of 2000ms (ping timeout)
java.lang.IllegalStateException: command '/Users/simonvergauwen/.gradle/nodejs/node-v14.15.4-darwin-x64/bin/node' exited with errors (exit code: 1)Anyone has any tips to figure out a better output for JS? I'm not even sure which file is failing 😕 Strangest thing, when I run
:arrow-core:cleanJsLegacyBrowserTest :arrow-core:jsLegacyBrowserTest
from IDEA then all tests pass, but when I run clean build
then it fails with the above error (same failure on CI). https://github.com/arrow-kt/arrow/pull/2441
EDIT: It's is strange because I just checked the test reports with this failure, and all test reports report 100% successfull.Stefan
07/07/2021, 8:55 AMscalacheck-shapeless
?Srki Rakic
07/07/2021, 2:43 PMdata class CreateTokensRequest(
val resourceId: UUID,
val requestId: String,
val schedule : Map<LocalDate, Long>,
)
I can’t quite figure out how to do map of LocalDate
to Long
I was trying something like this.
val createRequestArb: Arb<CreateTokensRequest> = Arb.bind(
Arb.string(),
mapOf(Arb.localDate(), Arb.long(0, 1000))
) { requestId, schedule -> CreateTokensRequest(UUID.randomUUID(), requestId, schedule) }
Gavin Ray
07/07/2021, 6:14 PMkotest
org: kotest/quarkus-example
-- the repo description says that "kotest doesn't fully support Quarkus yet, this is a test repo"
Does anyone happen to know if there are actually problems with it, or if it's just not officially been sanctioned. Would love to use kotest in Quarkus 😃Srki Rakic
07/08/2021, 1:55 AMlistOf(localDate: LocalDate)
if one date is in the past, the function should return false. I see that Arb.localDate
takes a min and max date, but what I’d like is to have a mix of valid and invalid dates, or empty list. How would I setup that property test?
Shouldn’t this pass?
test("debug") {
Arb.list(
Arb.localDate(maxDate = LocalDate.now().minusDays(30)),
1..6
).merge(
Arb.list(
Arb.localDate(minDate = LocalDate.now().plusDays(30)),
0..6
)
).forAll {
it.any { date -> date.isBefore(LocalDate.now()) }
}
}
This should have at least one date in the past?Pitel
07/08/2021, 8:29 AMLeoColman
07/09/2021, 1:18 PMPitel
07/12/2021, 6:48 AM> Task :compileTestKotlinJs FAILED
e: Could not find "org.jetbrains.kotlinx:kotlinx-coroutines-core" in [/home/pitel/.local/share/kotlin/daemon]
e: Failed to resolve Kotlin library: org.jetbrains.kotlinx:kotlinx-coroutines-core
Any idea why this fails with 5.0.0 snapshot?Srki Rakic
07/18/2021, 1:14 AMminDate
. So when you specify minDate
that is after the default edge case date, it will (intermittently) fail. Here’s an example Arb.localDate(minDate = LocalDate.now().plusDays(10))
will generate a 2021-02-28
date. I wonder if this intentional, or a bug?HunJeong
07/20/2021, 12:47 AM...
@ContextConfiguration(classes = [(Components::class)])
class SpringExtensionTest : WordSpec() {
override fun isolationMode() = IsolationMode.InstancePerTest // or InstancePerLeaf
override fun extensions() = listOf(SpringExtension)
@Autowired
private var service: UserService? = null
init {
"SpringExtension" should {
"have autowired the service" {
service?.repository?.findUser()?.name shouldBe "system_user"
}
...
‘have autowired the service’ test is broken
---
but I change this code to
...
@ContextConfiguration(classes = [(Components::class)])
class SpringListenerTest : WordSpec() {
override fun isolationMode() = IsolationMode.InstancePerTest // or InstancePerLeaf
override fun listeners() = listOf(SpringListener)
@Autowired
private var service: UserService? = null
init {
"SpringListener" should {
"have autowired the service" {
service?.repository?.findUser()?.name shouldBe "system_user"
}
...
It worksMatt
07/22/2021, 1:51 PMDan T
07/23/2021, 8:31 PMeventually
, which looked like this:
fun <T> eventually(duration: Duration, f: () -> T): T = eventually(duration, Exception::class.java, f)
The current implementation looks like this:
suspend fun <T> eventually(duration: Duration, f: suspend () -> T): T
A couple questions around this:
1. In the past I've typically just sprinkled runBlocking
into test coroutine-related functions. It looks like kotest's test framework puts everything being tested in a coroutine context via the TestContext
. Are there any design docs or articles on that? I'm curious about why that is.
2. For a project that's not using coroutines, are there any suggested idioms/examples on how to be able to cleanly use things like eventually
in a junit 5 oriented test framework?Guillaume Saint-Etienne
07/26/2021, 8:59 AMAli Khaleqi Yekta
07/28/2021, 5:38 AMdimsuz
08/03/2021, 11:25 PMTest failed for /tmp/file1.png (shrunk from /tmp/file2.png)(links would be clickable in IDE) I see no such mechanism to provide "custom artifacts" either in JUnit or in Kotest, am I right? I found only junit xml reports which looks quite off-putting for me :)
Stefan
08/06/2021, 3:19 PMgradle check --scan
results of the build somewhere?dimsuz
08/06/2021, 3:38 PMArb
?Jgafner
08/09/2021, 9:41 AMHenning B
08/10/2021, 10:07 AMlist.none { it is State.StateA } shouldBe true
Goal is, to check if the list does not contain an element which matches a given predicateSebastian Schuberth
08/12/2021, 6:20 AMSebastian Schuberth
08/16/2021, 11:42 AMGavin Ray
08/17/2021, 5:56 PM.jar
files.
• JUnit5 has the ConsoleLauncher
under junit-platform-console-standalone
• Kotest has KotestEngineLauncher
under io.kotest.engine.launcher.MainKt
• I think other frameworks also have standalone .jar
launchers which can discover and run + report tests, given some set of CLI args
My question is around how exactly the Kotest one works/how to use it. I wasn't able to find very much documentation on it -- only by digging through code:
data class LauncherArgs(
// A path to the test to execute. Nested tests will also be executed
val testpath: String?,
// restricts tests to the package or subpackages
val packageName: String?,
// the fully qualified name of the spec class which contains the test to execute
val spec: String?,
// true to force true colour on the terminal; auto to have autodefault
val termcolor: String?,
// the fully qualified name of a reporter implementation
val reporter: String?,
// Tag expression to control which tests are executed
val tagExpression: String?,
// true to output the configuration values when the Engine is created
val dumpconfig: Boolean?
)
Is there a guide anywhere on how someone interested in make a process-based wrapper for Kotest would go about it?
And perhaps a bit unrelated, is this even a good idea?Richard Gomez
08/20/2021, 2:17 PMpgContainer
doesn't start until the first test is executed. However, @DataR2dbcTest
tries to configure the Spring context before starting any tests, which obviously fails:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.r2dbc.pool.ConnectionPool]: Factory method 'connectionFactory' threw exception; nested exception is org.springframework.boot.autoconfigure.r2dbc.ConnectionFactoryOptionsInitializer$ConnectionFactoryBeanCreationException: Failed to determine a suitable R2DBC Connection URL
Caused by: org.springframework.boot.autoconfigure.r2dbc.ConnectionFactoryOptionsInitializer$ConnectionFactoryBeanCreationException: Failed to determine a suitable R2DBC Connection URL
I'm going to play around with using the PostgreSQLContainer defined in BaseIntegrationTest
, rather than defining one in my Spec.Richard Gomez
08/20/2021, 2:23 PMio.kotest.extensions:kotest-extensions-testcontainers:${kotest.version}
• io.kotest.extensions:kotest-extensions-testcontainers-jvm:${kotest.version}
However, io.kotest.extensions:kotest-extensions-testcontainers-jvm
doesn't exist in Maven Central, but io.kotest:kotest-extensions-testcontainers-jvm
does.dave08
08/22/2021, 11:18 AMEmil Kantis
08/24/2021, 5:01 PMIncompleteExecutionException
or specialization there-of.. I assume, when using Junit platform, it would be fine to import those exceptions and throw them? Is there any more "kotest-native" way of doing this?Łukasz Bednarczyk
08/24/2021, 7:07 PMxenomachina
08/27/2021, 7:33 PMv4.6.0
(also, git describe
says 3.3.0-RC2-2145-g5e9758a42
).