RFR: 8231591: [TESTBUG] Create additional two phase jpackage tests [v3]

Alexey Semenyuk asemenyuk at openjdk.java.net
Thu Sep 24 13:52:31 UTC 2020


On Wed, 23 Sep 2020 23:05:06 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:

>> test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageTest.java line 320:
>> 
>>> 318:     }
>>> 319:
>>> 320:     public PackageTest addLauncherName(String name) {
>> 
>> There is no need to make this function public and explicitly call it from tests.
>> It would be better to add call to this function from AdditionalLauncher.applyTo(PackageTest).
>
> But test calls AdditionalLauncher.applyTo(JPackageCommand cmd), which does not have reference to PackageTest. Do you
> know why we need two applyTo()?

Just change the test code to call AdditionalLauncher.applyTo(PackageTest):
`launcher1.applyTo(packageTest);
launcher2.applyTo(packageTest)`

AdditionalLauncher.applyTo(JPackageCommand) is for non-packaging tests.

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

PR: https://git.openjdk.java.net/jdk/pull/263


More information about the core-libs-dev mailing list