You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Peter Bacsko (JIRA)" <ji...@apache.org> on 2016/06/24 11:36:16 UTC
[jira] [Created] (OOZIE-2584) Eliminate Thread.sleep() calls in
TestMemoryLocks
Peter Bacsko created OOZIE-2584:
-----------------------------------
Summary: Eliminate Thread.sleep() calls in TestMemoryLocks
Key: OOZIE-2584
URL: https://issues.apache.org/jira/browse/OOZIE-2584
Project: Oozie
Issue Type: Bug
Reporter: Peter Bacsko
Assignee: Peter Bacsko
Priority: Minor
There are a lot of Thread.sleep() calls in TestMemoryLocks.
For example:
{code}
new Thread(l1).start();
Thread.sleep(500);
new Thread(l2).start();
Thread.sleep(500);
{code}
This solution is very fragile. On a slower build machine, Thread2 might actually start earlier than Thread1, causing test failure.
Eliminate sleeps and use a more stable approach for start/stop coordination (possibly CountDownLatches).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)