Integrated: 8353332: Test jdk/jshell/ToolProviderTest.java failed in relation to enable-preview

Jan Lahoda jlahoda at openjdk.org
Tue Apr 8 09:28:19 UTC 2025


On Mon, 7 Apr 2025 15:44:35 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> JShell keeps persisted preferences in `java.util.prefs.Preferences`. But, during tests, an empty persistence is typically used, to avoid values persisted on the test machine to affect the test.
> 
> But, in case of `jdk/jshell/ToolProviderTest.java`, this is not done, as JShell is started using the `Tool` interface.
> 
> This patch strives to fix that, by adding indirection in building JShell in `JShellToolProvider`, and using that in the test to inject empty persistence.
> 
> Thanks to @jaikiran for figuring out the probable cause.

This pull request has now been integrated.

Changeset: 9088afc4
Author:    Jan Lahoda <jlahoda at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/9088afc4f16b6265e640bf176d8ca8e3ac6ca45c
Stats:     51 lines in 2 files changed: 37 ins; 1 del; 13 mod

8353332: Test jdk/jshell/ToolProviderTest.java failed in relation to enable-preview

Reviewed-by: jpai, asotona

-------------

PR: https://git.openjdk.org/jdk/pull/24492


More information about the kulla-dev mailing list