Fixed the test to actually reproduce the issue

Hi @porcelli, the test wasn't reproducing [BZ-1110794](https://bugzilla.redhat.com/show_bug.cgi?id=1110794) because it neither failed nor hanged before the fix. I have improved it so that one of the threads gets stuck in the endless loop and the test would fail with TimeoutException before the fix.