Skip to content

Commit 086796b

Browse files
Marcelo Vanzinzzcclp
authored andcommitted
[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 <[email protected]> Closes apache#12785 from vanzin/SPARK-14391. (cherry picked from commit 73c20bf) (cherry picked from commit 16b7f1d)
1 parent 32692f4 commit 086796b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

launcher/src/main/java/org/apache/spark/launcher/LauncherServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ protected void handle(Message msg) throws IOException {
298298
Hello hello = (Hello) msg;
299299
ChildProcAppHandle handle = pending.remove(hello.secret);
300300
if (handle != null) {
301-
handle.setState(SparkAppHandle.State.CONNECTED);
302301
handle.setConnection(this);
302+
handle.setState(SparkAppHandle.State.CONNECTED);
303303
this.handle = handle;
304304
} else {
305305
throw new IllegalArgumentException("Received Hello for unknown client.");

0 commit comments

Comments
 (0)