com-lihaoyi / mill

Your shiny new Java/Scala build tool!
https://mill-build.com/
MIT License
2k stars 308 forks source link

Retry example integration tests that didn't finish after 5 minutes #3125

Closed lefou closed 3 months ago

lefou commented 3 months ago

The idea is, that our example integration tests should finish after a short period of time. But sometimes then hang in CI, so we simply abort and retry them automatically, instaed of manually.

The hardcoded timeout of 5 minutes is just a guess. I want to see the CI results. Maybe, we can make it configurable per test suite.

lolgab commented 3 months ago

The problem with this approach is that the Future is not cancelled, so the other runs will run concurrently with the first.

lefou commented 3 months ago

The problem with this approach is that the Future is not cancelled, so the other runs will run concurrently with the first.

How about using a Java future, which is cancellable?

lolgab commented 3 months ago

I'm not very familiar with it, but if it's cancelable it is better, yes. Otherwise you need to run a Thread and handle it manually.