Anyone used Playwright with Kotest? We've just bee...
# kotest
r
Anyone used Playwright with Kotest? We've just been trying it, but it's explicitly not threadsafe (has unsychronized / non volatile variables) so I'm not sure how well it plays with coroutines. Eschewing suspend calls / withContext calls seems to have got round this, though there's a ton of other problems we're fighting so it's possible I misdiagnosed thread safety as an issue.
s
https://playwright.dev/java/ ? never heard of it before, looks cool though
I guess as long as you run everything sequentially (ie one thread) then it wouldn't matter?
m
looking at here (https://playwright.dev/java/docs/test-runners#running-tests-in-parallel) running in parallel wouldn't hurt, but you have to limit each parallel run to use its own playwright instance
r
It's not parallelism, it's memory change visibility that's the issue
(I think!)
I was calling playwright in a
withContext(<http://Dispatchers.IO|Dispatchers.IO>)
block, which seemed to be resulting in a change to a `Page`'s url field not being visible in the thread I was checking it in, despite definitely having been updated.