Ashutosh Mestry created ATLAS-2037:

             Summary: Unit Test Failure: 
                 Key: ATLAS-2037
             Project: Atlas
          Issue Type: Bug
          Components:  atlas-core
    Affects Versions: trunk
            Reporter: Ashutosh Mestry
            Assignee: Ashutosh Mestry
            Priority: Minor
             Fix For: trunk, 0.8.1-incubating

- The test has few mocks, but we don’t mock _HookConsumer_ (derived from 
_ShutdownableThread_). Hence, the object needs be in line with its usage 
- The _ShutdownableThread_ has a _CountdownLatch_ that is checked during 

In the test, the _HookConsumer_ was not being started at all. This caused 
_shutdownLatch_ (of type _CountdownLatch_) not to decrement, since no work was 
performed, but anticipating work is going to be done. The test thus ended up 
not getting completed, since the thread was in perpetual wait.

The _HookConsumer_ should be used such that it is started and shutdown. So the 
test passes.

_HookConsumer_ should check for _shouldRun_ in _shutdown_ method, so that the 
case where _shutdown_ is called without _start_ is handled.

This message was sent by Atlassian JIRA

Reply via email to