Marshall Schor created UIMA-3433:
------------------------------------
Summary: UIMA-AS cleanup of semaphore testing wrong thing
Key: UIMA-3433
URL: https://issues.apache.org/jira/browse/UIMA-3433
Project: UIMA
Issue Type: Bug
Components: Async Scaleout
Affects Versions: 2.4.2AS
Reporter: Marshall Schor
Assignee: Marshall Schor
Priority: Minor
There is a test to clear a semaphore in uima-as as part of the stop method,
which does
{code:borderStyle=solid}
// release all permits
if ( semaphore != null ) {
while ( semaphore.availablePermits() > 0) {
semaphore.release();
}
}
{code}
Stepping through this shows that each call to release() increases (not
decreases) the number of availablePermits.
Replace with drainPermits(), which appears to be the intent.
--
This message was sent by Atlassian JIRA
(v6.1#6144)