JDK-8293591 : Remove use of Thread.stop from jshell tests
  • Type: Sub-task
  • Component: tools
  • Sub-Component: jshell
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-09-09
  • Updated: 2022-09-19
  • Resolved: 2022-09-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20
20 masterFixed
Description
The jshell tests have an infrastructure class named UITesting that uses Thread.stop. This needs to be updated to remove the dependency on Thread.stop, otherwise there are test failures like this:

java.lang.UnsupportedOperationException
	at java.base/java.lang.Thread.stop(Thread.java:1658)
	at UITesting.doRunTest(UITesting.java:127)
	at HistoryUITest.testPrevNextSnippet(HistoryUITest.java:51)

Right now, there seem to be 7 jshell tests that make use of this:

jdk/jshell/ToolTabSnippetTest.java
jdk/jshell/ToolTabCommandTest.java
jdk/jshell/ToolShiftTabTest.java
jdk/jshell/ToolMultilineSnippetHistoryTest.java
jdk/jshell/PasteAndMeasurementsUITest.java	
jdk/jshell/IndentUITest.java
jdk/jshell/HistoryUITest.java
Comments
Changeset: fbd8b42d Author: Jan Lahoda <jlahoda@openjdk.org> Date: 2022-09-15 11:27:15 +0000 URL: https://git.openjdk.org/jdk/commit/fbd8b42d70f41ab322c64d7dbcb15c81e8d515dc
15-09-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10271 Date: 2022-09-14 17:06:05 +0000
14-09-2022