Fix race condition in SparkListenerSuite (fixes SPARK-908).