8256801: tools/jpackage/share/FileAssociationsTest.java#id0 failed unpack.bat with "Exit code: 1603"

Reviewed-by: asemenyuk, almatvee, kizune
This commit is contained in:
Andy Herrick 2020-11-24 14:59:13 +00:00
parent 303631e3d5
commit ff6df15be3

View File

@ -65,7 +65,11 @@ public class WindowsHelper {
Executor.Result result = null;
for (int attempt = 0; attempt != 3; ++attempt) {
result = misexec.executeWithoutExitCodeCheck();
if (result.exitCode == 1618) {
// The given Executor may either be of an msiexe command or an
// unpack.bat script containing the msiexec command. In the later
// case, when misexec returns 1618, the unpack.bat may return 1603
if ((result.exitCode == 1618) || (result.exitCode == 1603)) {
// Another installation is already in progress.
// Wait a little and try again.
ThrowingRunnable.toRunnable(() -> Thread.sleep(3000)).run();