Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/1179#discussion_r51342679
--- Diff:
brooklyn-server/core/src/test/java/org/apache/brooklyn/util/core/task/DynamicSequentialTaskTest.java
---
@@ -88,7 +88,11 @@ public void setUp() {
@AfterMethod(alwaysRun=true)
public void tearDown() throws Exception {
- if (em != null) em.shutdownNow();
+ if (em != null) {
+ // need to await termination, otherwise
interrupted-but-still-running threads
+ // may update the cancellations/messages and interfere with
subsequent tests
+ Assert.assertTrue(em.shutdownNow(Duration.FIVE_SECONDS));
--- End diff --
Personal preference to use `Asserts.DEFAULT_TIMEOUT` pretty much
everywhere, unless a test is genuinely time-sensitive. I don't see any reason
to decide on different length of time to wait when doing functional testing
(i.e. when waiting for something to complete asyc).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---