From 9253c29fd263e56145eea9e63c8dfe55ec448794 Mon Sep 17 00:00:00 2001 From: Andy Herrick Date: Mon, 11 May 2020 15:29:52 -0400 Subject: [PATCH] 8244620: Fix test WinUpgradeUUIDTest failures in Mach5 Reviewed-by: asemenyuk, prr --- test/jdk/ProblemList.txt | 1 - .../jdk/tools/jpackage/windows/WinUpgradeUUIDTest.java | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index fabef8d853e..7f330931974 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -897,7 +897,6 @@ sanity/client/SwingSet/src/ScrollPaneDemoTest.java 8225013 linux-all # core_tools tools/jlink/JLinkReproducibleTest.java 8217166 windows-all -tools/jpackage/windows/WinUpgradeUUIDTest.java#id1 8244620 windows-all ############################################################################ diff --git a/test/jdk/tools/jpackage/windows/WinUpgradeUUIDTest.java b/test/jdk/tools/jpackage/windows/WinUpgradeUUIDTest.java index fd0c3b9d5b1..f1effb3f07b 100644 --- a/test/jdk/tools/jpackage/windows/WinUpgradeUUIDTest.java +++ b/test/jdk/tools/jpackage/windows/WinUpgradeUUIDTest.java @@ -182,19 +182,25 @@ public class WinUpgradeUUIDTest { void assertEquals(PackageTest x, PackageTest y) { var entryX = propertyValues().get(x); var entryY = propertyValues().get(y); - TKit.assertEquals(entryX.getValue(), entryY.getValue(), + // if MsiBundler is not supported, these will be null + if (entryX != null && entryY != null) { + TKit.assertEquals(entryX.getValue(), entryY.getValue(), String.format( "Check %s is the same for %s and %s command lines", propertyName(), entryX.getKey(), entryY.getKey())); + } } void assertNotEquals(PackageTest x, PackageTest y) { var entryX = propertyValues().get(x); var entryY = propertyValues().get(y); - TKit.assertNotEquals(entryX.getValue(), entryY.getValue(), + // if MsiBundler is not supported, these will be null + if (entryX != null && entryY != null) { + TKit.assertNotEquals(entryX.getValue(), entryY.getValue(), String.format( "Check %s is different for %s and %s command lines", propertyName(), entryX.getKey(), entryY.getKey())); + } } protected abstract String propertyName();