-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8350013: Add a test for JDK-8150442 #23825
base: master
Are you sure you want to change the base?
8350013: Add a test for JDK-8150442 #23825
Conversation
…m in IDE this way.
…annotation if the class has a function with the given name and @test annotation
This reverts commit 45a2ab5.
…only in the test work directory but in the sub-directories too.
…teTempFile() tests
…createTempFile() methods
…st installation failures.
…s. Make WindowsHelper use PS as alternative to reading registry values to get paths of special folders
…They belong to different branch
👋 Welcome back asemenyuk! A progress list of the required criteria for merging this PR into |
@alexeysemenyukoracle This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 40 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
@alexeysemenyukoracle The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
@sashamatveev PTAL |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good with minor comments.
} | ||
|
||
void configureUninstallVerifiers(PackageTest test, Consumer<Verifiable> verifiableAccumulator) { | ||
for (final var verifier : uninstallVerifiers) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space after verifier
.
case SKIP_NO_PACKAGE_HANDLER -> { | ||
TKit.trace(String.format("No handler of [%s] action for %s command", | ||
action, cmd.getPrintableCommandLine())); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need return
here and at line 495? Also, do you think it might be better to make switch
consistent? For example this one uses ->
and below :
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need return here and at line 495?
Yes. It should exit the function early to avoid jumping in the next switch
block.
do you think it might be better to make
switch
consistent?
Totally!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It should exit the function early to avoid jumping in the next switch block.
With ->
it should not fall into next case. Maybe I am missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With
->
it should not fall into next case. Maybe I am missing something.
Right, but there are two siwtch
blocks in the function. Without return
the control flow will get to the second one. return
-s prevents this.
Add a test to verify jpackage is using a custom MSI condition blocking package installation depending on the version of Windows where the package installer runs. Support for this MSI condition was added in JDK-8150442.
The test adds an unconditionally failing OS-version MSI condition to the resource directory. MSI installer using this condition should always fail. The exit code of the failed installation would be 1603. Extended error information can be dug in the MSI log file. To make the test work, the following changes to jpackage test lib have been made:
PackageTest.setExpectedInstallExitCode(int)
method to configure the expected exit code of a package installation;PackageTest.createMsiLog(boolean)
to enable or disable creation of msi log files in a PackageTest instance andOptional<Path> JPackageCommand.winMsiLogFile()
to access the current log file from the callbacks registered with the PackageTest instance.Added tests for PackageTest class (PackageTestTest).
Additionally, improved the code in WindowsHelper detecting paths to Start Menu, Desktop, and other common paths. Previously, it relied on reading these paths from the registry. On some machines, required registry keys are not available. The code now will call .NET
Environment.GetFolderPath()
function through powershell if a registry key is missing.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23825/head:pull/23825
$ git checkout pull/23825
Update a local copy of the PR:
$ git checkout pull/23825
$ git pull https://git.openjdk.org/jdk.git pull/23825/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23825
View PR using the GUI difftool:
$ git pr show -t 23825
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23825.diff
Using Webrev
Link to Webrev Comment