Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/20221#discussion_r160694447
--- 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 --
I usually just see people write `Thread.sleep(500)` but no big deal.
This is somewhat hacky, but may be OK for just this test's purpose.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]