Netflix/RxJava — pull request #1128 by akarnokd (2014-04-29 11:32:19+00:00)
Title: Fix for SerializedObserverTest

Fixed the SerializedObserverTest's problematic assertions:

- ```testMultiThreadedWithNPEinMiddle``` might schedule all non-null values before the exception might reach the serialized observer. In addition, waiting after the serialization doesn't help because the cheap value emissions get queued up before that, again, possibly before the exception. The new code adds some delays to the non-null elements allowing the exception to get into the queue. I've looped it 10.000 times without failure, but there is still a non-zero chance the ```new NullPointerException()``` thread is significantly delayed and ends up as the last event.
- ```testNotificationDelay``` might fail due to thread scheduling of the two ```OnNextThread``` delayed too much in respect to each other before the main thread allows the pass-through. The fix is to let bot instances' Thread reach the run method and then let the main thread pass through them. Again, a loop of 10.000 succeeded locally.
- Both tests are run 10 times to be more sure.