Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-33116][tests][release-1.15] Fix CliClientTest.testCancelExecutionInteractiveMode fails with NPE #23536

Closed
wants to merge 1 commit into from

Conversation

Jiabao-Sun
Copy link
Contributor

What is the purpose of the change

[FLINK-33116][tests] Fix CliClientTest.testCancelExecutionInteractiveMode fails with NPE

Sep 18 02:26:15 02:26:15.743 [ERROR] org.apache.flink.table.client.cli.CliClientTest.testCancelExecutionInteractiveMode  Time elapsed: 0.1 s  <<< ERROR!
Sep 18 02:26:15 java.lang.NullPointerException
Sep 18 02:26:15 	at org.apache.flink.table.client.cli.CliClient.closeTerminal(CliClient.java:284)
Sep 18 02:26:15 	at org.apache.flink.table.client.cli.CliClient.close(CliClient.java:108)
Sep 18 02:26:15 	at org.apache.flink.table.client.cli.CliClientTest.testCancelExecutionInteractiveMode(CliClientTest.java:314)
Sep 18 02:26:15 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 

Brief change log

The CliClient is not thread-safe: The close call fails with a NullPointerException because CliClient.close() calls closeTerminal() if a terminal set. But the test finishes the client.executeInInteractiveMode() in a separate thread which calls closeTerminal() in the end as well.

Using CheckedThread instead of Thread.

Verifying this change

This change is already covered by existing tests.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)

@flinkbot
Copy link
Collaborator

flinkbot commented Oct 18, 2023

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@Jiabao-Sun
Copy link
Contributor Author

@flinkbot run azure

@XComp
Copy link
Contributor

XComp commented Oct 20, 2023

1.15 is not supported anymore. I'm gonna close this one without merging.

@XComp XComp closed this Oct 20, 2023
@Jiabao-Sun
Copy link
Contributor Author

1.15 is not supported anymore. I'm gonna close this one without merging.

OK. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants