dCache/dcache — pull request #835 by gbehrmann (2014-09-11 06:52:07+00:00)
Title: common: Fix race condition in AtomicCounter unit test

The patch modifies two unit tests. The first slept, although the
race between the two threads did not lead to failing tests (the
test thus was non-deterministic, but not non-determinate).

The second test could fail on certain interleavings of threads.
This is resolved by hooking into the base class at a specific
point to synchronize the execution of the two threads involved.
This too elliminates the sleep from the test.

Finally, the unit test is moved to the correct package and
Maven module.

Target: trunk
Request: 2.10
Request: 2.9
Request: 2.8
Request: 2.7
Request: 2.6
Require-notes: no
Require-book: no
Acked-by: Albert Rossi
Patch: https://rb.dcache.org/r/7293/
(cherry picked from commit 7175bf09ae69fa76825d603e5d0bd7dfc78a51d4)