hornetq/hornetq — pull request #279 by gaohoward (2012-06-26 08:02:24+00:00)
Title: Add a delay in the UnitTestCase.tearDown().

Add a delay in the UnitTestCase.tearDown().
reason: CLOSE_RUNNABLES is added and removed by a separate thread.
so when we in teardown() examine its members, some of them may still be in the process
of being removed. So before copying the set, if we see the set is not empty, we don't
know whether its members are in the process of being removed, or they will
be permanent remained in the set due to some potential bug. Therefore we give a slight time delay to
allow more chance for the set to be cleared.