You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/24 22:33:28 UTC

[GitHub] [spark] HeartSaVioR commented on a change in pull request #27004: [SPARK-30348][CORE] Fix flaky test failure on "MasterSuite.SPARK-27510: Master should avoid ..."

HeartSaVioR commented on a change in pull request #27004: [SPARK-30348][CORE] Fix flaky test failure on "MasterSuite.SPARK-27510: Master should avoid ..."
URL: https://github.com/apache/spark/pull/27004#discussion_r361229507
 
 

 ##########
 File path: core/src/test/scala/org/apache/spark/deploy/master/MasterSuite.scala
 ##########
 @@ -682,7 +682,11 @@ class MasterSuite extends SparkFunSuite
         // an app would be registered with Master once Driver set up
         assert(worker.apps.nonEmpty)
         appId = worker.apps.head._1
-        assert(master.idToApp.contains(appId))
+
+        // we found the case where the test was too fast which all steps were done within
+        // an interval - in this case, we have to check either app is available in master
+        // or marked as completed. See SPARK-30348 for details.
+        assert(master.idToApp.contains(appId) || master.completedApps.exists(_.id == appId))
 
 Review comment:
   I'd say the test was wrong as I added comment in code; the code is observing the state change on different thread which should be relying on listener stuff; if we can't receive updates via listener, we should take into account that we may not be able to capture the state change sequentially. Regarding adding delay I'll comment again.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org