Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15009#discussion_r117548947
  
    --- Diff: 
core/src/test/java/org/apache/spark/launcher/SparkLauncherSuite.java ---
    @@ -183,12 +185,37 @@ public void testChildProcLauncher() throws Exception {
         assertEquals(0, app.waitFor());
       }
     
    +  @Test
    +  public void testThreadLauncher() throws Exception {
    +    // This test is failed on Windows due to the failure of initiating 
executors
    +    // by the path length limitation. See SPARK-18718.
    +    assumeTrue(!Utils.isWindows());
    +
    +    launcher = new SparkLauncher();
    +    launcher
    +      .setMaster("local")
    +      .setAppResource(SparkLauncher.NO_RESOURCE)
    +      .setConf(SparkLauncher.DRIVER_EXTRA_JAVA_OPTIONS,
    +        "-Dfoo=bar -Dtest.appender=childproc")
    +      .setConf(SparkLauncher.DRIVER_EXTRA_CLASSPATH, 
System.getProperty("java.class.path"))
    +      .setMainClass(SparkLauncherTestApp.class.getName())
    +      .launchAsThread(true)
    +      .addAppArgs("thread");
    +    final SparkAppHandle app = launcher.startApplication();
    +    sleep(3000);
    +    assertEquals(false, app.getState().isFinal());
    --- End diff --
    
    You still haven't fixed this. This is what I wrote the very first time I 
commented on this:
    
    > Hmm... you need to wait for the app to finish, or kill it eventually. And 
check that it actually ran.
    
    You are not waiting for the app to finish. You're checking that 
`app.getState().isFinal()` is `false` here, so basically this test waits 3 
seconds and still expects the app to be running after that.
    
    You want exactly the opposite. You want the app to finish at some point, 
and not just finish, but finish successfully. That means checking for a 
specific status.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to