Hey everyone :wave: , Can anyone give me any advic...
# javascript
s
Hey everyone 👋 , Can anyone give me any advice with following error? I configured a
useConfigDirectory
pointing here: https://github.com/arrow-kt/arrow/blob/main/arrow-libs/karma/chrome_bin.js https://github.com/arrow-kt/arrow/blob/sv-js-fx-coroutines/arrow-libs/fx/arrow-fx-stm/build.gradle#L20
Copy code
Disconnected (0 times) , because no message in 30000 ms.
java.lang.IllegalStateException: command '/Users/runner/.gradle/nodejs/node-v14.15.4-darwin-x64/bin/node' exited with errors (exit code: 1
t
cc @Ilya Goncharov [JB]
i
Hi! Hm, I have JS tests passed in arrow-libs now Which task is failed in your case? Do you have Chrome installed in your local machine (or CI)?
s
Hey @Ilya Goncharov [JB], Thanks for helping looking into this. I have Chrome installed locally but don't think we have it installed on CI. I can add it on Github actions though. There is two other PRs open for Arrow Optics (https://github.com/arrow-kt/arrow/pull/2441), and Arrow Fx (https://github.com/arrow-kt/arrow/pull/2444). Both are failing on CI, and also locally with
./gradlew (--no-build-cache --no-daemon) clean build
. We've also seen that the Arrow Core test suite is still flaky on CI: https://kotlinlang.slack.com/archives/C8UK6RTHU/p1625602863012400?thread_ts=1625476179.010300&cid=C8UK6RTHU More info here: https://kotlinlang.slack.com/archives/CT0G9SD7Z/p1625571349252600
i
So I found some problems locally, but possibly it is not related with problems in PRs. I faced with problem with timeout on suspend tests. I found that for example for Fx part,
fx
is separate Gradle root project. So when you set config directory through
project.rootDir
, it uses
fx
directory, not
arrow-libs
But if this problems is fixed, I get all tests green in Fx PR branch. I can add some advices, if you are sure, that everything can be fine, and only problems is tiemouts. Karma has 2 properties, which can disable timeout (but of course it will help, only if problem is that everything really works, but spend more time than timeout) • browserNoActivityTimeoutpingTimeout We use it for example in debug case.
s
Hey @Ilya Goncharov [JB], Thank you so much for the reply & help! I was completely unware that Fx was a separate project, and it was thus not picking up the Karma config 😅 I think the one I had with Arrow Optics was related to
pingTimeout
, so I will look at the suggested params. I'm actually trying to rely on the timeout functionality of Kotest, such that Arrow can ignore the karma timeouts, or is that an incorrect assumption?
i
I am not sure, how kotest’s timeouts works But Karma’s tiemouts consider if browser not send some messages during timeout, it fails test, because something went wrong. So it is kinda infrastructure level of timeouts, not about running code. Ad JFI how we configure timeouts in debug case (ad fully disabling timeouts) https://github.com/JetBrains/kotlin/blob/master/libraries/tools/kotlin-test-js-runner/src/DebugConfigurator.js#L99
s
Thank you for all the info. I should be able to figure it out from here. I'll keep you posted if I succeeded and was able to merge full JS support for Arrow 🙌
I am not sure, how kotest’s timeouts works
TL;DR it installs
kotlinx.coroutines.withTimeout
around the user's tests
👍 1
It's working now. Thank you @Ilya Goncharov [JB]!
👍 1