fix race in DSTTest.testCancel
authorAlex Heneveld <alex.heneveld@cloudsoftcorp.com>
Fri, 22 Jan 2016 09:41:00 +0000 (09:41 +0000)
committerAlex Heneveld <alex.heneveld@cloudsoftcorp.com>
Fri, 22 Jan 2016 11:30:38 +0000 (11:30 +0000)
commitcfd54d5bc5201f0d8d8cde29ac6893f5a6090947
tree9ecca9e106d60fac725c5f72e11f01b873bd077f
parentb28ba027e4aa5e0221bc5a1189466f3671f99b8a
fix race in DSTTest.testCancel

seeing errors on jenkins server though it runs fine locally;
have patched what looks like one race, but not sure it explains the failure
at https://builds.apache.org/job/incubator-brooklyn-pull-requests/org.apache.brooklyn$brooklyn-core/2440/testReport/junit/org.apache.brooklyn.util.core.task/DynamicSequentialTaskTest/testCancelled/
where we are seeing an extra semaphore at the end of the test;
have added comments and logging in case it is seen again.
(locally all is well.)
brooklyn-server/core/src/main/java/org/apache/brooklyn/util/core/task/BasicExecutionManager.java
brooklyn-server/core/src/main/java/org/apache/brooklyn/util/core/task/BasicTask.java
brooklyn-server/core/src/test/java/org/apache/brooklyn/util/core/task/DynamicSequentialTaskTest.java