Skip to content
Snippets Groups Projects
Commit 73c20bf3 authored by Marcelo Vanzin's avatar Marcelo Vanzin Committed by Reynold Xin
Browse files

[SPARK-14391][LAUNCHER] Fix launcher communication test, take 2.

There's actually a race here: the state of the handler was changed before
the connection was set, so the test code could be notified of the state
change, wake up, and still see the connection as null, triggering the assert.

Author: Marcelo Vanzin <vanzin@cloudera.com>

Closes #12785 from vanzin/SPARK-14391.
parent bc36fe6e
No related branches found
No related tags found
No related merge requests found
......@@ -298,8 +298,8 @@ class LauncherServer implements Closeable {
Hello hello = (Hello) msg;
ChildProcAppHandle handle = pending.remove(hello.secret);
if (handle != null) {
handle.setState(SparkAppHandle.State.CONNECTED);
handle.setConnection(this);
handle.setState(SparkAppHandle.State.CONNECTED);
this.handle = handle;
} else {
throw new IllegalArgumentException("Received Hello for unknown client.");
......
......@@ -26,7 +26,6 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import org.junit.Ignore;
import org.junit.Test;
import static org.junit.Assert.*;
......@@ -62,7 +61,7 @@ public class LauncherServerSuite extends BaseSuite {
}
}
@Ignore
@Test
public void testCommunication() throws Exception {
ChildProcAppHandle handle = LauncherServer.newAppHandle();
TestClient client = null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment