Tests the situation in which the ClientLogManager is shut down before it has finished the asynchronous initRemoteLogging call. This can happen in a ComponentClient -based application that performs a short task.
It is important to make the stdout printing part of this test, e.g. by using TAT without output suppression tricks, because among other things we expect the string Will abort ClientLogManager::initRemoteLogging because remote logging seems no longer needed. when initRemoteLogging is interrupted by a shutdown.
The main test thread that logs some messages and the thread that calls initRemoteLogging compete for the internal lock ClientLogManager#logQueueLock, whose functioning is being tested here.
Unfortunately this cannot be totally deterministic, so we must accept occasional failures of the kind that the output contains "Remote log: <Info .../>" instead of "Will abort ..." strings, or vice versa. |