-
Task
-
Resolution: Done
-
Major
-
7.0.0.Beta3
-
None
-
2017 Week 36-37, 2017 Week 38-39, 2017 Week 40-41-42
-
NEW
-
NEW
I've tested it manually locally (it works on my machine, but there is no regression test). Follows up on PLANNER-491. Currently the work for that is still on my branch (work in progress): https://github.com/droolsjbpm/optaplanner/pull/229
This isn't easy to test, but some idea's:
- Use a "Solver<TestdataSolution> solver" (there are some unit tests that do this already) by using PlannerTestUtils.buildSolverFactory(...)
- Use a custom SimpleScoreDirector that is designed to throw an exception on 1 (and only 1) partition child thread.
- Check if it bubbles up on the solver thread (it will be in the exception chain).
- Somehow check if all the child threads stopped running... Not sure how to do this properly (so without Thread.sleep()). If you do end up using sleeps, don't use 1 big sleep (for example 10 seconds), but use a loop to do multiple small sleeps that check the condition (for example for (i = 0 -> 50)
{ sleep(200ms); if (condition) break;}
, so a successful run takes less than 5 seconds on modern hardware.
- relates to
-
PLANNER-491 Partitioned Search
- Resolved