-
-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Describe the bug
The classpath that poly test calculates is not stable/reproducible across machines, leading to unpredictable behavior of tests across multiple machines.
To Reproduce
I added debug output to the test orchestrator to print all-paths so that I could see the order being different on multiple machines. The Jetty libraries have changed their group/artifact over time but retained some of the same class names which means that a non-deterministic ordering of the classpath means that you can have tests pass on one machine but fail on another due to that ordering cause a different artifact to be found "first" on the classpath and an incompatible class used.
Expected behavior
tools.deps.alpha uses a specific sorting algorithm to ensure a reproducible classpath across all environments -- the ideal would be Polylith producing that exact same order (this is tricky because poly test has to construct a projection of the :test alias across all the bricks in order to construct the "basis"). Not so ideal but acceptable would at least be for the order of the classpath produced by poly test to be deterministic. That means not using sets or hash maps to store elements of the classpath.