scala / scala-dev

Scala 2 team issues. Not for user-facing bugs or directly actionable user-facing improvements. For build/test/infra and for longer-term planning and idea tracking. Our bug tracker is at https://github.com/scala/bug/issues
Apache License 2.0
130 stars 14 forks source link

`scala-concurrent-tck` runs long #864

Closed lrytz closed 5 months ago

lrytz commented 8 months ago

2.13.x, on my M1:

ok 1 - jvm/scala-concurrent-tck.scala          [duration 68.95s]

Credits to @Duhemm and Gradle's Develocity :)

Some recent PRs around that test

where I find "duration 6.85s" and "it takes about 13 seconds", so maybe something has changed in the meantime.

som-snytt commented 8 months ago

It says, ominously, "I might have to up my Klang level."

finished testUncaughtExceptionReporting 5401539741146 after 62135 ms

The test change and https://github.com/scala/bug/issues/12902 were both 2.13.7. I happened to look at that ticket recently.

I cherry-picked the test onto 2.13.6 and it is still long, so it must be broken. I'll see about fixing it.

Edit: first run this morning was normal, i.e., fast. This was the test which wanted to wait for the pool thread to terminate, to ensure that it would not spuriously report an error. So the test waits on its keepAlive, which is configurable in JDK 9 (as a constructor parameter only) and defaults to 60 sec. Maybe the test can use a regular thread pool executor instead.

som-snytt commented 8 months ago

The PR tries to create a pool with short keep-alive, but now I wonder if it's possible to engineer the test so that it would run on a thread whose keep-alive is just expiring. That would involve scheduling a minute of other tests ahead of it. Note that the long wall-clock time of the test was relatively benign.