Github user gengliangwang commented on a diff in the pull request:
https://github.com/apache/spark/pull/20221#discussion_r160719518
--- Diff:
core/src/test/java/org/apache/spark/launcher/SparkLauncherSuite.java ---
@@ -133,6 +134,10 @@ public void testInProcessLauncher() throws Exception {
p.put(e.getKey(), e.getValue());
}
System.setProperties(p);
+ // Here DAGScheduler is stopped, while
SparkContext.clearActiveContext may not be called yet.
+ // Wait for a reasonable amount of time to avoid creating two active
SparkContext in JVM.
+ // See SPARK-23019 and SparkContext.stop() for details.
+ TimeUnit.MILLISECONDS.sleep(500);
--- End diff --
Yep, either way should work.
Using `TimeUnit` is just following `BaseSuite.java`.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]