qos-ch/logback — pull request #236 by SierraGolf (2014-12-29 09:30:39+00:00)
Title: fixed flaky mocking in AbstractSocketAppenderTest due to multi-threading issues

it seems that there are issues with mockito when consuming and modifying a mock at the same time from different threads.

previously I was setting up the ```socketConnector``` to always return a socket on ```call()``` before each test and setting the mock to return "null" on ```call()``` after each test. this was supposed to break infinite loops in the socket connector thread.

the AbstractSocketAppenderTest only seems to fail on cli in specific conditions. it did not fail when run separately from cli, nor when run separately from the IDE.

moving the complete setup of how many sockets we want to create (one in most cases) in to the preconditions of the specific tests fixed the problem by basically making sure the mock is setup completely before it is being consumed.