diff --git a/restli-tools/src/test/java/com/linkedin/restli/tools/data/TestExtensionSchemaValidationCmdLineApp.java b/restli-tools/src/test/java/com/linkedin/restli/tools/data/TestExtensionSchemaValidationCmdLineApp.java index e5aa5c0994..f8957a1a86 100644 --- a/restli-tools/src/test/java/com/linkedin/restli/tools/data/TestExtensionSchemaValidationCmdLineApp.java +++ b/restli-tools/src/test/java/com/linkedin/restli/tools/data/TestExtensionSchemaValidationCmdLineApp.java @@ -17,7 +17,7 @@ import java.io.File; -import org.testng.Assert; +import org.testng.asserts.SoftAssert; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -89,12 +89,17 @@ public void testExtensionSchemaValidation(String inputDir, boolean isValid, Stri try { ExtensionSchemaValidationCmdLineApp.parseAndValidateExtensionSchemas(resolverPath, new File(inputPath)); - Assert.assertTrue(isValid); + SoftAssert softAssert = new SoftAssert(); + softAssert.assertTrue(isValid); + softAssert.assertEquals(null, errorMessage); + softAssert.assertAll(); } catch (Exception e) { - Assert.assertTrue(!isValid); - Assert.assertEquals(e.getMessage(), errorMessage); + SoftAssert softAssert = new SoftAssert(); + softAssert.assertTrue(!isValid); + softAssert.assertEquals(e.getMessage(), errorMessage); + softAssert.assertAll(); } } }