In property based tests, when I set `kotest.propte...
# kotest
k
In property based tests, when I set
kotest.proptest.default.iteration.count
to something low, e.g.
1
, plenty of my tests fails because
computeDefaultIteration
provides
1
for arbs with edgecases where
minIterations > 1
. Is this a bug or there's logic behind this? Right now
computeDefaultIteration
explicitly supports only
Exhaustive
https://github.com/kotest/kotest/blob/master/kotest-property/src/commonMain/kotlin/io/kotest/property/config.kt#L17
s
Can you clarify this a bit for me. You set min default to 1, and then you're saying it stays at 1, even if the arb has minimum iterations higher ?
k
I use
checkAll
with no iteration count which uses
computeDefaultIteration
. When I set
kotest.proptest.default.iteration.count= 1
all tests using Arbs fail because edge cases are not included in the
computeDefaultIteration
yet
checkAll
requires number of iteration to be >=
minIterations
.
s
I see, so it never advances up from 1
and then 1 isn't enough to run the test
I'll fix now
k
yes, so I have to manually set
checkAll(minForThatTest)
fantastic, I can raise a PR tomorrow if you are busy
s
yeah that's annoying
It's 5am I'm just chilling, I can do it 🙂
k
lol
10pm here
s
australia ?
k
unchilling
yeah
s
g'day
I bet you hate it when people say that
I'm from the UK so you can call me a dirty pom
k
not really cause I am not a citizen yet
s
ah
k
dirty pom lol, I had too much Maven today
s
I see you're from KRK
I work with a bunch of guys from KRK
I wonder if a max iteration count is useful, to stop tests going insane, if you had loads of edgecases
k
I guess once from KRK forever from KRK
well you can have edgecases that you need to test and edgecases that you want to test
the latter is sample
s
are you an android guy
k
yeah
just got Pixel 5 this week
s
sorry, I mean do you write android apps at atlassian
k
no
backend services
s
Ah ok. Was just looking for some android help 🙂
k
well I know Android guys but looks like I am not one of them 😆
ok, thanks for your help, time for me to go 😴
s
good night
k
just in case - enjoy your holidays and have a great New Year!
s
same to you