https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
kotest-contributors
  • a

    AJ Alt

    08/20/2020, 4:27 PM
    I noticed this commit https://github.com/kotest/kotest/commit/a94c8ee87ed0fb9c3d0ce2b62d819f46a5b6d8dd and, since I'm adding broswer js to Clikt for the next release, I'm curious what sonatype issues you ran into, and did that commit fix them?
    s
    2 replies · 2 participants
  • a

    Ashish Kumar Joy

    03/11/2021, 2:49 PM
    @sam Is any one using kotest 4.4.3 with kotlin multiplatform with JS target(IR backend). What i am observing without IR target Kotest is able to run js test but with IR target Kotest is ignoring the JS test. Anyone facing similar issue or any extra configuration required for IR to work with kotest. https://github.com/ashishkujoy/kotlin-js-jvm-library
    s
    11 replies · 2 participants
  • a

    AJ Alt

    03/16/2021, 4:39 PM
    FYI it doesn't look like the changelog was updated for 4.4.3
    s
    2 replies · 2 participants
  • s

    sam

    04/25/2021, 4:15 AM
    4.5.0.RC1 is out
    🎉 2
    :kotlin-intensifies: 1
    m
    6 replies · 2 participants
  • a

    atara

    05/11/2021, 5:58 AM
    Hi @sam, any reason this library was not upgraded?
    kotest-assertions-arrow-jvm
    . Thanks
    s
    1 reply · 2 participants
  • s

    sam

    05/19/2021, 3:46 PM
    Any thoughts on the next release being 5.0 and removing all the deprecated stuff we've built up over the 18 months of 4.x
    r
    l
    5 replies · 3 participants
  • s

    sam

    08/17/2021, 10:33 PM
    If anyone wants to opine on this: https://github.com/kotest/kotest/issues/2417
    👍 1
    j
    1 reply · 2 participants
  • e

    Emil Kantis

    09/12/2021, 11:57 AM
    👋 Figured I'd drop in here since I'm trying to contribute a bit. Kotest makes life as a Kotlin dev so much more enjoyable, so I'm trying to pay it forward a bit. I'm a self-employed contractor for a semi-large Swedish company. Company recently switched from Java to Kotlin, and I brought in kotest, mockk and some other good stuff when I joined. Hoping to spread it wider within the company going forward 🙂 I also do some smaller freelance gigs on the side. Hoping to hone my skills and become an expert on kotest to be able to advocate it further 🙂 see you around
    🙌🏻 1
    🙌 3
    ❤️ 1
    s
    1 reply · 2 participants
  • m

    mitch

    09/13/2021, 11:30 PM
    @sam i was checking out 5.0.0 snapshot builds, and I’ve got `[java.lang.NoSuchMethodError: 'io.kotest.property.Arb io.kotest.property.arbitrary.BuildersKt.constant(io.kotest.property.Arb$Companion, java.lang.Object)']`I have a feeling that’s because some of our deps (maybe property-arrow) was compiled against kotest 4.x. in 5.x it seems like
    Arb.constant
    was moved to its specific kotlin file. What strategy do we have on this? i can raise a PR to perhaps change the usage of
    Arb.constant
    to
    Arb.of
    or perhaps a simple arbitrary builder (which i think didn’t move)
    s
    5 replies · 2 participants
  • m

    mitch

    09/18/2021, 12:05 AM
    Hi all. just bouncing some ideas around property testing. I just got some inspiration based on some recent work in property and suspend funs, as well as @sam’s branch on prop spec. This is 100% possible with some tweaks in the proptest and PropertyContext. so before
    test(...) {
      checkAll(arbFirst, arbSecond) { first, second ->
        sut.execute(first, second)
      }
    }
    and after
    test(...) { sut.execute(arbFirst.value(), arbSecond.value()) }
    It’s really mindblowing! I can imagine how many hundreds lines of code I can simplify in our current tests if kotest has this.
    s
    88 replies · 2 participants
  • s

    sam

    09/20/2021, 1:03 AM
    @Jim why did you want to move json matchers to another repo, I can't remember
    j
    e
    34 replies · 3 participants
  • e

    Emil Kantis

    09/21/2021, 1:29 AM
    afaik there's currently no solution for automatically deriving an
    Arb
    for a data class, right? I saw a SO question about it and started fiddling with it and made some progress. would it be ok to pursue or is someone else doing something similar? @mitch: do you know? 🙂
    m
    s
    2 replies · 3 participants
  • s

    sam

    09/21/2021, 1:49 AM
    do you want me to bootstrap the json repo ?
    j
    2 replies · 2 participants
  • e

    Emil Kantis

    09/21/2021, 8:57 PM
    What version of IntelliJ and kotlin plugin are you guys using? This feels ridiculous.. 😞
    s
    m
    10 replies · 3 participants
  • e

    Emil Kantis

    09/22/2021, 2:04 PM
    Could you have a look at this when you have some minutes to spare @sam? 🙂 https://github.com/kotest/kotest/pull/2532 I also started looking into the shrinker-thing, but nothing to share yet 🙂
    s
    9 replies · 2 participants
  • s

    sam

    09/23/2021, 1:13 AM
    You're a member of the kotest org, you can do this work on branches in the kotest repo if you prefer, then it's easier for others to contribute too
    e
    2 replies · 2 participants
  • m

    mitch

    09/23/2021, 11:35 AM
    @Emil Kantis by the way, on the approach on computing cartesian product for shrinks, can we discuss this a little bit? https://kotlinlang.slack.com/archives/CSYLDDZUY/p1632354439096200 this can cause problems on combinatorial explosion if we’re not careful. That was an issue @sam and I needed to urgently fix a while back https://github.com/kotest/kotest/issues/2112
    e
    s
    18 replies · 3 participants
  • s

    sam

    09/23/2021, 2:10 PM
    Can I get a quick look over the lifecycle docs I have added. Just seeing if they're readable, and if any suggestions on naming changes. https://kotest.io/docs/framework/spec-lifecycle.html
    e
    3 replies · 2 participants
  • e

    Emil Kantis

    09/25/2021, 9:24 AM
    I’m a little confused when it comes to shrinking. Specifically if we start with a failing sample, then the input will simply be shrunk to it’s smallest possible value. Wouldn’t it be of more value to first find a succeeding sample and then shrink to try to find the “border” between success and failure?
    checkAll<Int> { it shouldBeGreaterThan 1000 }
    Given the above, wouldn’t it make sense that shrinking should inform me that it is succeeding for 1000, failing for 999?
    m
    s
    13 replies · 3 participants
  • s

    sam

    09/26/2021, 3:13 PM
    @Emil Kantis what do you think about https://github.com/kotest/kotest/issues/2541
    e
    j
    23 replies · 3 participants
  • s

    sam

    09/26/2021, 5:06 PM
    @Emil Kantis you closed off the rename inspectors ticket, do you not want to do that anymore ?
    e
    27 replies · 2 participants
  • s

    sam

    09/26/2021, 9:31 PM
    just running the tests in gradle first to make sure it downloaded everything
    e
    2 replies · 2 participants
  • s

    sam

    09/26/2021, 9:32 PM
    and change the default in the build file from IC-213 to IC-211 if its still 213
    e
    3 replies · 2 participants
  • e

    Emil Kantis

    09/28/2021, 8:28 PM
    I'll raise a PR in refreshVersions for kotest-framework-datatest and fixing extensions (they've been bundled up to use a single version for all extensions, when in reality all extensions have independent versioning). Is there anything else anyone noticed is missing in refreshVersions when it comes to kotest dependencies? 🙂
    s
    3 replies · 2 participants
  • e

    Emil Kantis

    09/28/2021, 9:55 PM
    Tests work at least.. but it's using something called
    KtExpression.resolveType()
    from
    package org.jetbrains.kotlin.idea.debugger.sequence.psi
    I think it has issues with expect/actual, amongst other things..
    3 replies · 1 participant
  • a

    AJ Alt

    10/09/2021, 4:59 PM
    Here's where those dropdown entries are defined: https://github.com/JetBrains/intellij-community/blob/943aadf32547ef82df3690e6ee8e549cebd3b2f0/plugins/kotlin/project-wizard/core/src/org/jetbrains/kotlin/tools/projectWizard/moduleConfigurators/ModuleConfiguratorWithTests.kt#L134-L185 The reason those are in the list is because they're the only JVM test plugins bundled with intellij. So unless you can convince JB to bundle the kotest plugin, I don't think you'll be able to add it to the dropdown.
    s
    l
    3 replies · 3 participants
  • e

    Emil Kantis

    10/11/2021, 10:19 PM
    @sam should I try to get a new version of the intellij plugin out? I think repeating this, running release-workflow and reverting does the trick?
    s
    18 replies · 2 participants
  • s

    sam

    10/20/2021, 2:17 PM
    I don't know if anyone else uses test containers, but using the new mountable extensions in kotest 5.0 we can do something like this:
    class DatabaseContainerTest : FunSpec() {
       init {
    
          val mysql = MySQLContainer<Nothing>("mysql:8.0.26").apply {
             withInitScript("init.sql")
             startupAttempts = 1
             withUrlParam("connectionTimeZone", "Z")
             withUrlParam("zeroDateTimeBehavior", "convertToNull")
          }
    
          val ds = install(JdbcTestContainerExtension(mysql)) {
             maximumPoolSize = 8
             minimumIdle = 4
          }
    
          test("read from database") {
             ds.connection.use {
                val rs = it.createStatement().executeQuery("SELECT * FROM hashtags")
                rs.next()
                rs.getString("tag") shouldBe "startrek"
             }
          }
       }
    }
    e
    1 reply · 2 participants
  • e

    Emil Kantis

    11/11/2021, 8:03 PM
    Is
    withData
    working as intended with regards to test-lifecycles? This test will never print
    Hello
    , for instance
    class SomeTest : FunSpec(
       {
          beforeEach { println("Hello") }
    
          context("some data test") {
             withData("World", "Foo", "Bar") { x ->
                println(x)
             }
          }
       }
    )
    s
    4 replies · 2 participants
  • e

    Emil Kantis

    11/16/2021, 5:41 PM
    You might be on it already, but I saw this in the last build log.. Some issue with 1.6 compiler? 😬
    java.io.FileNotFoundException: /home/runner/work/kotest/kotest/kotest-framework/kotest-framework-engine/build/classes/kotlin/jvm/main/io/kotest/engine/interceptors/TestEngineStartedFinishedInterceptor$intercept$2$1.class (Too many open files)
    s
    29 replies · 2 participants
Powered by Linen
Title
e

Emil Kantis

11/16/2021, 5:41 PM
You might be on it already, but I saw this in the last build log.. Some issue with 1.6 compiler? 😬
java.io.FileNotFoundException: /home/runner/work/kotest/kotest/kotest-framework/kotest-framework-engine/build/classes/kotlin/jvm/main/io/kotest/engine/interceptors/TestEngineStartedFinishedInterceptor$intercept$2$1.class (Too many open files)
s

sam

11/16/2021, 5:42 PM
Having plenty of issues with 1.6 😞
is this the build that's currently running ?
e

Emil Kantis

11/16/2021, 5:42 PM
The one before it
s

sam

11/16/2021, 5:42 PM
ah ok
well hopefully the current one goes green, it's got quite far
then I'll release 5.0.0.RC
e

Emil Kantis

11/16/2021, 5:42 PM
Happened around 18-20 mins IIRC
so this one might be the one
🤞
s

sam

11/16/2021, 5:43 PM
the linux build just failed
same thing
I have no idea how to fix that, seems you can't increase file limit in GH actions
e

Emil Kantis

11/16/2021, 6:10 PM
Can I try adding these steps? Step 1 should give us some data on what the limits are, step 2 tries to change them (not sure if this will work) and step 3 to check if it seem to have worked.. I have no idea if any of this would work :homer-disappear:
-  name: Check filesystem (Pre-configure)
            run: |
              ulimit -n 
              ulimit -Sn 
              ulimit -Hn
              cat /etc/security/limits.conf
              whoami
            
         -  name: Configure filesystem
            run: |
              ulimit -n 200000
              ulimit -Sn 200000
              ulimit -Hn 200000
            
         -  name: Check filesystem (post-configure)
            run: |
              ulimit -n
              ulimit -Sn
              ulimit -Hn
s

sam

11/16/2021, 6:10 PM
feel free !
If that doesn't work, I will revert the build back to the last green and work through it again
e

Emil Kantis

11/16/2021, 6:12 PM
Woops, added to wrong workflow 🤐
Limit seems to be 65k files. Increasing it might not be an option 😞
Run ulimit -n 200000
/home/runner/work/_temp/93d0ef51-74af-4dcd-893b-d4861d96ad0c.sh: line 1: ulimit: open files: cannot modify limit: Operation not permitted
s

sam

11/16/2021, 6:14 PM
yeah 65k should be enough
it's a bug in 1.6 then I guess
e

Emil Kantis

11/16/2021, 6:25 PM
Reverted the workflow changes 🙂
s

sam

11/16/2021, 6:30 PM
ok
I had to revert loads of stuff but it's green again
e

Emil Kantis

11/16/2021, 8:04 PM
great stuff!! 🙌
what's the plan now? re-introduce the dropped commits one by one to see what caused the issue?
s

sam

11/16/2021, 8:43 PM
yes
there's a bunch of builds going on now
e

Emil Kantis

11/16/2021, 8:45 PM
awesome 🙂 great work man. looking forward to seeing 5.0 out there
s

sam

11/16/2021, 8:49 PM
yeah me too, although I'm still not entirely happy with the concurrency support
but I guess it will have to do for now
View count: 4