diff --git a/.github/workflows/jdk-17-tests.yml b/.github/workflows/jdk-17-tests.yml index 22f137bc78..c274fe05f9 100644 --- a/.github/workflows/jdk-17-tests.yml +++ b/.github/workflows/jdk-17-tests.yml @@ -21,8 +21,8 @@ jobs: - name: Set up JDK 17 uses: actions/setup-java@v2 with: - distribution: 'adopt' - java-version: 17 + distribution: 'temurin' + java-version: '17.0.6' - name: check mvn version run: echo "MAVEN_VERSION=$(mvn -v)" - name: check java version diff --git a/integration/management-api-tests/src/test/java/org/wso2/micro/integrator/api/AuditLogTestCase.java b/integration/management-api-tests/src/test/java/org/wso2/micro/integrator/api/AuditLogTestCase.java index a092a6ab9b..0ac753639f 100644 --- a/integration/management-api-tests/src/test/java/org/wso2/micro/integrator/api/AuditLogTestCase.java +++ b/integration/management-api-tests/src/test/java/org/wso2/micro/integrator/api/AuditLogTestCase.java @@ -245,7 +245,7 @@ public void testUpdateLogger() throws IOException, InterruptedException, Automat Assert.assertTrue(carbonLogReader.checkForLog("{\"performedBy\":\"admin\",\"action\":\"updated\",\"type\":\"log_level\",\"info\":\"{\\\"loggerName\\\":\\\"com-atomikos\\\",\\\"loggingLevel\\\":\\\"DEBUG\\\"}\"}", 120)); } - @Test(groups = {"wso2.esb" }, priority = 3, + @Test(groups = {"wso2.esb" }, priority = 4, description = "Test upload CAPP") public void testCAppUpload() throws IOException, InterruptedException, AutomationFrameworkException { if (!isManagementApiAvailable) { @@ -258,7 +258,7 @@ public void testCAppUpload() throws IOException, InterruptedException, Automatio Assert.assertTrue(carbonLogReader.checkForLog("{\"performedBy\":\"admin\",\"action\":\"created\",\"type\":\"carbon_application\",\"info\":\"{\\\"cAppFileName\\\":\\\"esb-artifacts-car_1.0.0.car\\\"}\"}", 120)); } - @Test(groups = {"wso2.esb" }, priority = 3, dependsOnMethods = "testCAppUpload", + @Test(groups = {"wso2.esb" }, priority = 4, dependsOnMethods = "testCAppUpload", description = "Test remove CAPP") public void testCAppRemove() throws IOException, InterruptedException, AutomationFrameworkException { if (!isManagementApiAvailable) { diff --git a/integration/management-api-tests/src/test/java/org/wso2/micro/integrator/api/RegistryResourcesTestCase.java b/integration/management-api-tests/src/test/java/org/wso2/micro/integrator/api/RegistryResourcesTestCase.java index 44850f4bc0..e9cc1326b2 100644 --- a/integration/management-api-tests/src/test/java/org/wso2/micro/integrator/api/RegistryResourcesTestCase.java +++ b/integration/management-api-tests/src/test/java/org/wso2/micro/integrator/api/RegistryResourcesTestCase.java @@ -658,12 +658,23 @@ public void testRegistryGetDirectoryExpandToVerifyChanges() throws IOException { JSONArray filesArray = jsonResponse.getJSONArray("files"); Assert.assertEquals(filesArray.length(), 4, "Assert Failed due to the mismatch of " + "actual vs expected resource count"); + boolean isTestJson = false; + boolean isTestText = false; + for (int i = 0; i < filesArray.length(); i++) { - log.info("printing fileArray element " + i + ": " + filesArray.getJSONObject(i).get("name").toString()); + if(filesArray.getJSONObject(i).get("name").toString().contains("test-json.json")) { + isTestJson = true; + } + + if(filesArray.getJSONObject(i).get("name").toString().contains("test-text.txt")) { + isTestText = true; + } } log.info("filesArray.getJSONObject(0).get(\"name\")::: " + filesArray.getJSONObject(0).get("name")); - Assert.assertTrue(filesArray.getJSONObject(0).get("name").toString().contains("test-json.json")); - Assert.assertTrue(filesArray.getJSONObject(1).get("name").toString().contains("test-text.txt")); + Assert.assertTrue(isTestJson, + "Assert Failed due to the mismatch of actual vs expected test-json file presence"); + Assert.assertTrue(isTestText, + "Assert Failed due to the mismatch of actual vs expected test-text file presence"); } @Test(groups = { "wso2.esb" }, description = "Test error - deleting non existing registry")