neo4j/neo4j — pull request #3108 by davidegrohmann (2014-09-19 14:21:52+00:00)
Title: Fix test DatabaseRegistryTest#shouldAwaitRunningQueriesBeforeDropping

Rationale:
It may happen that the threads in the test are not properly synchronized and
the one shutting down the db is faster than the first one to grap a reference to it.
Hence it might happen that the test fails.

Details:
- A new latch has been introduced to make sure that the thread are properly sunchronized.
- Test class has been cleaned up by introducing a @Before method.
- Fixed 2 deprecation warnings.