From 825d013914824d8c5487938263ed950ed737abad Mon Sep 17 00:00:00 2001 From: ShammiL Date: Wed, 21 Aug 2024 18:36:19 +0530 Subject: [PATCH 1/4] Add test logs --- .../test/odata/ODataETagTestCase.java | 21 ++++++++++++++++--- ...AggregateWithHighMaxAndLowMinTestCase.java | 7 ++++++- .../foreach/ForEachJSONPayloadTestCase.java | 7 ++++++- .../ESBJAVA1832MessageInjectorTestCase.java | 7 ++++++- .../transport/test/ESBJAVA2907TestCase.java | 7 ++++++- .../transport/test/MSMPCronForwarderCase.java | 7 ++++++- 6 files changed, 48 insertions(+), 8 deletions(-) diff --git a/integration/dataservice-hosting-tests/tests-integration/tests/src/test/java/org/wso2/ei/dataservice/integration/test/odata/ODataETagTestCase.java b/integration/dataservice-hosting-tests/tests-integration/tests/src/test/java/org/wso2/ei/dataservice/integration/test/odata/ODataETagTestCase.java index 95470b16e6..b78a47a914 100644 --- a/integration/dataservice-hosting-tests/tests-integration/tests/src/test/java/org/wso2/ei/dataservice/integration/test/odata/ODataETagTestCase.java +++ b/integration/dataservice-hosting-tests/tests-integration/tests/src/test/java/org/wso2/ei/dataservice/integration/test/odata/ODataETagTestCase.java @@ -225,7 +225,12 @@ public void validateETagConcurrentHandlingTestCaseForPatchMethod() throws Except @Test(groups = "wso2.dss", description = "etag concurrent handling with delete method test", dependsOnMethods = "validateETagConcurrentHandlingTestCaseForPatchMethod") public void validateETagConcurrentHandlingTestCaseForDeleteMethod() throws Exception { - if (System.getenv("CI_BUILD_SKIP").equals("true")) { + System.out.println( + Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) + ? "This test is temporarily skipped for this workflow" + : "" + ); + if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { System.out.println("This test is temporarily skipped for this workflow"); String endpoint = webAppUrl + "/odata/" + serviceName + "/" + configId + "/FILES"; String content = "{\"FILENAME\": \"WSO2PROD\" ,\"TYPE\" : \"dss\"}"; @@ -278,7 +283,12 @@ public void validateETagConcurrentHandlingTestCaseForDeleteMethod() throws Excep @Test(groups = "wso2.dss", description = "property modification using etag concurrent handling with put method test", dependsOnMethods = "validateETagConcurrentHandlingTestCaseForDeleteMethod") public void validateETagConcurrentHandlingTestCaseForUpdatePropertyWithPutMethod() throws Exception { // To insert values - if (System.getenv("CI_BUILD_SKIP").equals("true")) { + System.out.println( + Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) + ? "This test is temporarily skipped for this workflow" + : "" + ); + if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { System.out.println("This test is temporarily skipped for this workflow"); String endpoint = webAppUrl + "/odata/" + serviceName + "/" + configId + "/FILES"; String content = "{\"FILENAME\": \"WSO2PROD\" ,\"TYPE\" : \"dss\"}"; @@ -333,7 +343,12 @@ public void validateETagConcurrentHandlingTestCaseForUpdatePropertyWithPutMethod @Test(groups = "wso2.dss", description = "property modification using etag concurrent handling with patch method test", dependsOnMethods = "validateETagConcurrentHandlingTestCaseForUpdatePropertyWithPutMethod") public void validateETagConcurrentHandlingTestCaseForUpdatePropertyWithPatchMethod() throws Exception { - if (System.getenv("CI_BUILD_SKIP").equals("true")) { + System.out.println( + Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) + ? "This test is temporarily skipped for this workflow" + : "" + ); + if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { System.out.println("This test is temporarily skipped for this workflow"); String entityEndpoint = webAppUrl + "/odata/" + serviceName + "/" + configId + "/FILES(\'WSO2PROD\')"; String endpoint = webAppUrl + "/odata/" + serviceName + "/" + configId + "/FILES(\'WSO2PROD\')/TYPE"; diff --git a/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/aggregate/AggregateWithHighMaxAndLowMinTestCase.java b/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/aggregate/AggregateWithHighMaxAndLowMinTestCase.java index e3231c5029..e972b3a8c2 100644 --- a/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/aggregate/AggregateWithHighMaxAndLowMinTestCase.java +++ b/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/aggregate/AggregateWithHighMaxAndLowMinTestCase.java @@ -158,7 +158,12 @@ public void testMoreNumberThanMaximum() throws IOException, XMLStreamException { @Test(groups = { "wso2.esb" }, description = "less number of messages than maximum count") public void testLessNumberThanMaximum() throws IOException, XMLStreamException { - if (System.getenv("CI_BUILD_SKIP").equals("true")) { + System.out.println( + Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) + ? "This test is temporarily skipped for this workflow" + : "" + ); + if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { int responseCount = 0; no_of_requests = 60; diff --git a/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/foreach/ForEachJSONPayloadTestCase.java b/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/foreach/ForEachJSONPayloadTestCase.java index abb4bcf555..85eb6935fe 100644 --- a/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/foreach/ForEachJSONPayloadTestCase.java +++ b/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/foreach/ForEachJSONPayloadTestCase.java @@ -50,7 +50,12 @@ public void uploadSynapseConfig() throws Exception { @Test(groups = {"wso2.esb"}, description = "Test ForEach mediator with JSON payload") public void testForEachMediatorWithJSONPayload() throws Exception { - if (System.getenv("CI_BUILD_SKIP").equals("true")) { + System.out.println( + Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) + ? "This test is temporarily skipped for this workflow" + : "" + ); + if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { String request = "{\"getQuote\":{\"request\":[{\"symbol\":\"IBM\"},{\"symbol\":\"WSO2\"},{\"symbol\":\"MSFT\"}]}}"; simpleHttpClient = new SimpleHttpClient(); diff --git a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA1832MessageInjectorTestCase.java b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA1832MessageInjectorTestCase.java index cb6f9cb15e..66c87467b1 100644 --- a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA1832MessageInjectorTestCase.java +++ b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA1832MessageInjectorTestCase.java @@ -53,7 +53,12 @@ protected void init() throws Exception { @Test(groups = { "wso2.esb" }, description = "Test proxy service with jms transport") public void testMessageInjection() throws Exception { - if (System.getenv("CI_BUILD_SKIP").equals("true")) { + System.out.println( + Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) + ? "This test is temporarily skipped for this workflow" + : "" + ); + if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { String queueName = "jmsQueue"; int numberOfMsgToExpect = 10; TimeUnit.SECONDS.sleep(15); diff --git a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA2907TestCase.java b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA2907TestCase.java index acae56f2f3..59388d33bb 100644 --- a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA2907TestCase.java +++ b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA2907TestCase.java @@ -23,7 +23,12 @@ protected void init() throws Exception { @Test(groups = "wso2.esb", description = "Test adding OMElements as properties when saving messages to the MessageStore") public void testAddingOMElementPropertyToMessageStore() throws Exception { - if (System.getenv("CI_BUILD_SKIP").equals("true")) { + System.out.println( + Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) + ? "This test is temporarily skipped for this workflow" + : "" + ); + if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { AxisServiceClient client = new AxisServiceClient(); client.sendRobust(Utils.getStockQuoteRequest("IBM"), getProxyServiceURLHttp("testPS"), "getQuote"); Assert.assertTrue(carbonLogReader.checkForLog(GET_QUOTE_REQUEST_BODY, DEFAULT_TIMEOUT), "OMElement is not saved to the message store"); diff --git a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/MSMPCronForwarderCase.java b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/MSMPCronForwarderCase.java index ce924ec272..af15cdaee7 100644 --- a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/MSMPCronForwarderCase.java +++ b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/MSMPCronForwarderCase.java @@ -69,7 +69,12 @@ protected void init() throws Exception { @Test(groups = { "wso2.esb" }, description = "Test Cron Forwarding of message processor") public void testMessageProcessorCronForwader() throws Exception { - if (System.getenv("CI_BUILD_SKIP").equals("true")) { + System.out.println( + Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) + ? "This test is temporarily skipped for this workflow" + : "" + ); + if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { // SEND THE REQUEST String addUrl = getProxyServiceURLHttp("MSMPRetrytest"); String payload = "{\"name\":\"Jack\"}"; From 6baf85c891d065374d38ce62e17ee9a180a85db5 Mon Sep 17 00:00:00 2001 From: ShammiL Date: Thu, 22 Aug 2024 09:56:45 +0530 Subject: [PATCH 2/4] Fix skip logic --- .../integration/test/odata/ODataETagTestCase.java | 13 ++++++------- .../AggregateWithHighMaxAndLowMinTestCase.java | 4 ++-- .../test/foreach/ForEachJSONPayloadTestCase.java | 4 ++-- .../test/ESBJAVA1832MessageInjectorTestCase.java | 4 ++-- .../esb/jms/transport/test/ESBJAVA2907TestCase.java | 4 ++-- .../jms/transport/test/MSMPCronForwarderCase.java | 4 ++-- 6 files changed, 16 insertions(+), 17 deletions(-) diff --git a/integration/dataservice-hosting-tests/tests-integration/tests/src/test/java/org/wso2/ei/dataservice/integration/test/odata/ODataETagTestCase.java b/integration/dataservice-hosting-tests/tests-integration/tests/src/test/java/org/wso2/ei/dataservice/integration/test/odata/ODataETagTestCase.java index b78a47a914..10b2bd4d44 100644 --- a/integration/dataservice-hosting-tests/tests-integration/tests/src/test/java/org/wso2/ei/dataservice/integration/test/odata/ODataETagTestCase.java +++ b/integration/dataservice-hosting-tests/tests-integration/tests/src/test/java/org/wso2/ei/dataservice/integration/test/odata/ODataETagTestCase.java @@ -228,9 +228,9 @@ public void validateETagConcurrentHandlingTestCaseForDeleteMethod() throws Excep System.out.println( Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) ? "This test is temporarily skipped for this workflow" - : "" + : "Test not skipped" ); - if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { + if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { System.out.println("This test is temporarily skipped for this workflow"); String endpoint = webAppUrl + "/odata/" + serviceName + "/" + configId + "/FILES"; String content = "{\"FILENAME\": \"WSO2PROD\" ,\"TYPE\" : \"dss\"}"; @@ -286,10 +286,9 @@ public void validateETagConcurrentHandlingTestCaseForUpdatePropertyWithPutMethod System.out.println( Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) ? "This test is temporarily skipped for this workflow" - : "" + : "Test not skipped" ); - if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { - System.out.println("This test is temporarily skipped for this workflow"); + if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { String endpoint = webAppUrl + "/odata/" + serviceName + "/" + configId + "/FILES"; String content = "{\"FILENAME\": \"WSO2PROD\" ,\"TYPE\" : \"dss\"}"; Map headers = new HashMap<>(); @@ -346,9 +345,9 @@ public void validateETagConcurrentHandlingTestCaseForUpdatePropertyWithPatchMeth System.out.println( Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) ? "This test is temporarily skipped for this workflow" - : "" + : "Test not skipped" ); - if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { + if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { System.out.println("This test is temporarily skipped for this workflow"); String entityEndpoint = webAppUrl + "/odata/" + serviceName + "/" + configId + "/FILES(\'WSO2PROD\')"; String endpoint = webAppUrl + "/odata/" + serviceName + "/" + configId + "/FILES(\'WSO2PROD\')/TYPE"; diff --git a/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/aggregate/AggregateWithHighMaxAndLowMinTestCase.java b/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/aggregate/AggregateWithHighMaxAndLowMinTestCase.java index e972b3a8c2..997a25e6cb 100644 --- a/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/aggregate/AggregateWithHighMaxAndLowMinTestCase.java +++ b/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/aggregate/AggregateWithHighMaxAndLowMinTestCase.java @@ -161,9 +161,9 @@ public void testLessNumberThanMaximum() throws IOException, XMLStreamException { System.out.println( Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) ? "This test is temporarily skipped for this workflow" - : "" + : "Test not skipped" ); - if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { + if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { int responseCount = 0; no_of_requests = 60; diff --git a/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/foreach/ForEachJSONPayloadTestCase.java b/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/foreach/ForEachJSONPayloadTestCase.java index 85eb6935fe..f32ed73e38 100644 --- a/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/foreach/ForEachJSONPayloadTestCase.java +++ b/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/foreach/ForEachJSONPayloadTestCase.java @@ -53,9 +53,9 @@ public void testForEachMediatorWithJSONPayload() throws Exception { System.out.println( Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) ? "This test is temporarily skipped for this workflow" - : "" + : "Test not skipped" ); - if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { + if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { String request = "{\"getQuote\":{\"request\":[{\"symbol\":\"IBM\"},{\"symbol\":\"WSO2\"},{\"symbol\":\"MSFT\"}]}}"; simpleHttpClient = new SimpleHttpClient(); diff --git a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA1832MessageInjectorTestCase.java b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA1832MessageInjectorTestCase.java index 66c87467b1..10d273feae 100644 --- a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA1832MessageInjectorTestCase.java +++ b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA1832MessageInjectorTestCase.java @@ -56,9 +56,9 @@ public void testMessageInjection() throws Exception { System.out.println( Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) ? "This test is temporarily skipped for this workflow" - : "" + : "Test not skipped" ); - if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { + if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { String queueName = "jmsQueue"; int numberOfMsgToExpect = 10; TimeUnit.SECONDS.sleep(15); diff --git a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA2907TestCase.java b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA2907TestCase.java index 59388d33bb..aac793a920 100644 --- a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA2907TestCase.java +++ b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA2907TestCase.java @@ -26,9 +26,9 @@ public void testAddingOMElementPropertyToMessageStore() throws Exception { System.out.println( Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) ? "This test is temporarily skipped for this workflow" - : "" + : "Test not skipped" ); - if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { + if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { AxisServiceClient client = new AxisServiceClient(); client.sendRobust(Utils.getStockQuoteRequest("IBM"), getProxyServiceURLHttp("testPS"), "getQuote"); Assert.assertTrue(carbonLogReader.checkForLog(GET_QUOTE_REQUEST_BODY, DEFAULT_TIMEOUT), "OMElement is not saved to the message store"); diff --git a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/MSMPCronForwarderCase.java b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/MSMPCronForwarderCase.java index af15cdaee7..2192df4aba 100644 --- a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/MSMPCronForwarderCase.java +++ b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/MSMPCronForwarderCase.java @@ -72,9 +72,9 @@ public void testMessageProcessorCronForwader() throws Exception { System.out.println( Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) ? "This test is temporarily skipped for this workflow" - : "" + : "Test not skipped" ); - if (Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { + if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { // SEND THE REQUEST String addUrl = getProxyServiceURLHttp("MSMPRetrytest"); String payload = "{\"name\":\"Jack\"}"; From 4d22db0642978759a3f0254605e8cd84cbc8ad5e Mon Sep 17 00:00:00 2001 From: ShammiL Date: Thu, 22 Aug 2024 14:09:40 +0530 Subject: [PATCH 3/4] Remove logs --- .../integration/test/odata/ODataETagTestCase.java | 15 --------------- .../AggregateWithHighMaxAndLowMinTestCase.java | 5 ----- .../test/foreach/ForEachJSONPayloadTestCase.java | 5 ----- .../test/ESBJAVA1832MessageInjectorTestCase.java | 5 ----- .../jms/transport/test/ESBJAVA2907TestCase.java | 5 ----- .../jms/transport/test/MSMPCronForwarderCase.java | 5 ----- 6 files changed, 40 deletions(-) diff --git a/integration/dataservice-hosting-tests/tests-integration/tests/src/test/java/org/wso2/ei/dataservice/integration/test/odata/ODataETagTestCase.java b/integration/dataservice-hosting-tests/tests-integration/tests/src/test/java/org/wso2/ei/dataservice/integration/test/odata/ODataETagTestCase.java index 10b2bd4d44..f8d036997d 100644 --- a/integration/dataservice-hosting-tests/tests-integration/tests/src/test/java/org/wso2/ei/dataservice/integration/test/odata/ODataETagTestCase.java +++ b/integration/dataservice-hosting-tests/tests-integration/tests/src/test/java/org/wso2/ei/dataservice/integration/test/odata/ODataETagTestCase.java @@ -225,11 +225,6 @@ public void validateETagConcurrentHandlingTestCaseForPatchMethod() throws Except @Test(groups = "wso2.dss", description = "etag concurrent handling with delete method test", dependsOnMethods = "validateETagConcurrentHandlingTestCaseForPatchMethod") public void validateETagConcurrentHandlingTestCaseForDeleteMethod() throws Exception { - System.out.println( - Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) - ? "This test is temporarily skipped for this workflow" - : "Test not skipped" - ); if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { System.out.println("This test is temporarily skipped for this workflow"); String endpoint = webAppUrl + "/odata/" + serviceName + "/" + configId + "/FILES"; @@ -283,11 +278,6 @@ public void validateETagConcurrentHandlingTestCaseForDeleteMethod() throws Excep @Test(groups = "wso2.dss", description = "property modification using etag concurrent handling with put method test", dependsOnMethods = "validateETagConcurrentHandlingTestCaseForDeleteMethod") public void validateETagConcurrentHandlingTestCaseForUpdatePropertyWithPutMethod() throws Exception { // To insert values - System.out.println( - Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) - ? "This test is temporarily skipped for this workflow" - : "Test not skipped" - ); if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { String endpoint = webAppUrl + "/odata/" + serviceName + "/" + configId + "/FILES"; String content = "{\"FILENAME\": \"WSO2PROD\" ,\"TYPE\" : \"dss\"}"; @@ -342,11 +332,6 @@ public void validateETagConcurrentHandlingTestCaseForUpdatePropertyWithPutMethod @Test(groups = "wso2.dss", description = "property modification using etag concurrent handling with patch method test", dependsOnMethods = "validateETagConcurrentHandlingTestCaseForUpdatePropertyWithPutMethod") public void validateETagConcurrentHandlingTestCaseForUpdatePropertyWithPatchMethod() throws Exception { - System.out.println( - Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) - ? "This test is temporarily skipped for this workflow" - : "Test not skipped" - ); if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { System.out.println("This test is temporarily skipped for this workflow"); String entityEndpoint = webAppUrl + "/odata/" + serviceName + "/" + configId + "/FILES(\'WSO2PROD\')"; diff --git a/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/aggregate/AggregateWithHighMaxAndLowMinTestCase.java b/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/aggregate/AggregateWithHighMaxAndLowMinTestCase.java index 997a25e6cb..4416fae5ef 100644 --- a/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/aggregate/AggregateWithHighMaxAndLowMinTestCase.java +++ b/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/aggregate/AggregateWithHighMaxAndLowMinTestCase.java @@ -158,11 +158,6 @@ public void testMoreNumberThanMaximum() throws IOException, XMLStreamException { @Test(groups = { "wso2.esb" }, description = "less number of messages than maximum count") public void testLessNumberThanMaximum() throws IOException, XMLStreamException { - System.out.println( - Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) - ? "This test is temporarily skipped for this workflow" - : "Test not skipped" - ); if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { int responseCount = 0; diff --git a/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/foreach/ForEachJSONPayloadTestCase.java b/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/foreach/ForEachJSONPayloadTestCase.java index f32ed73e38..9f3ae09a2c 100644 --- a/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/foreach/ForEachJSONPayloadTestCase.java +++ b/integration/mediation-tests/tests-mediator-1/src/test/java/org/wso2/carbon/esb/mediator/test/foreach/ForEachJSONPayloadTestCase.java @@ -50,11 +50,6 @@ public void uploadSynapseConfig() throws Exception { @Test(groups = {"wso2.esb"}, description = "Test ForEach mediator with JSON payload") public void testForEachMediatorWithJSONPayload() throws Exception { - System.out.println( - Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) - ? "This test is temporarily skipped for this workflow" - : "Test not skipped" - ); if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { String request = "{\"getQuote\":{\"request\":[{\"symbol\":\"IBM\"},{\"symbol\":\"WSO2\"},{\"symbol\":\"MSFT\"}]}}"; diff --git a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA1832MessageInjectorTestCase.java b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA1832MessageInjectorTestCase.java index 10d273feae..146079dc1d 100644 --- a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA1832MessageInjectorTestCase.java +++ b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA1832MessageInjectorTestCase.java @@ -53,11 +53,6 @@ protected void init() throws Exception { @Test(groups = { "wso2.esb" }, description = "Test proxy service with jms transport") public void testMessageInjection() throws Exception { - System.out.println( - Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) - ? "This test is temporarily skipped for this workflow" - : "Test not skipped" - ); if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { String queueName = "jmsQueue"; int numberOfMsgToExpect = 10; diff --git a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA2907TestCase.java b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA2907TestCase.java index aac793a920..8643b4781a 100644 --- a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA2907TestCase.java +++ b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/ESBJAVA2907TestCase.java @@ -23,11 +23,6 @@ protected void init() throws Exception { @Test(groups = "wso2.esb", description = "Test adding OMElements as properties when saving messages to the MessageStore") public void testAddingOMElementPropertyToMessageStore() throws Exception { - System.out.println( - Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) - ? "This test is temporarily skipped for this workflow" - : "Test not skipped" - ); if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { AxisServiceClient client = new AxisServiceClient(); client.sendRobust(Utils.getStockQuoteRequest("IBM"), getProxyServiceURLHttp("testPS"), "getQuote"); diff --git a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/MSMPCronForwarderCase.java b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/MSMPCronForwarderCase.java index 2192df4aba..ac9bdc9439 100644 --- a/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/MSMPCronForwarderCase.java +++ b/integration/mediation-tests/tests-transport/src/test/java/org/wso2/carbon/esb/jms/transport/test/MSMPCronForwarderCase.java @@ -69,11 +69,6 @@ protected void init() throws Exception { @Test(groups = { "wso2.esb" }, description = "Test Cron Forwarding of message processor") public void testMessageProcessorCronForwader() throws Exception { - System.out.println( - Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP")) - ? "This test is temporarily skipped for this workflow" - : "Test not skipped" - ); if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { // SEND THE REQUEST String addUrl = getProxyServiceURLHttp("MSMPRetrytest"); From 29a25aba9a6ec3abe276b32b823493c183bc38c6 Mon Sep 17 00:00:00 2001 From: ShammiL Date: Fri, 23 Aug 2024 09:05:42 +0530 Subject: [PATCH 4/4] Disable testServiceCatalogProxyServiceMetadata test --- .../test/ServiceCatalogTestCase.java | 52 ++++++++++--------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/integration/mediation-tests/tests-other/src/test/java/org/wso2/carbon/esb/serviceCatalog/test/ServiceCatalogTestCase.java b/integration/mediation-tests/tests-other/src/test/java/org/wso2/carbon/esb/serviceCatalog/test/ServiceCatalogTestCase.java index b7a6a44ce1..396e3a50df 100644 --- a/integration/mediation-tests/tests-other/src/test/java/org/wso2/carbon/esb/serviceCatalog/test/ServiceCatalogTestCase.java +++ b/integration/mediation-tests/tests-other/src/test/java/org/wso2/carbon/esb/serviceCatalog/test/ServiceCatalogTestCase.java @@ -296,32 +296,34 @@ public void testMIRestart() throws IOException, AutomationUtilException, Interru @Test(groups = {"wso2.esb"}, description = "Test service catalog with proxy services", priority = 11) public void testServiceCatalogProxyServiceMetadata() throws CarbonException, IOException, AutomationUtilException, InterruptedException { - File metadataCAPP = new File(getESBResourceLocation() + File.separator - + SERVICE_CATALOG_FOLDER + File.separator + CAPP_WITH_PROXY_META); - serverConfigurationManager.copyToCarbonapps(metadataCAPP); - // replace server startup scripts - String shFile = CarbonBaseUtils.getCarbonHome() + File.separator + "bin" + File.separator + SH_FILE_NAME; - String batFile = CarbonBaseUtils.getCarbonHome() + File.separator + "bin" + File.separator + BAT_FILE_NAME; - File oldShFile = new File( shFile + ".backup"); - File newShFile = new File(shFile); - if (new File(shFile).delete() && oldShFile.renameTo(newShFile)) { - assertTrue(newShFile.exists(), "Error while replacing default sh script"); - } - File oldBatFile = new File( batFile + ".backup"); - File newBatFile = new File(batFile); - if (new File(batFile).delete() && oldBatFile.renameTo(newBatFile)) { - assertTrue(newBatFile.exists(), "Error while replacing default bat script"); + if (!Boolean.parseBoolean(System.getenv("CI_BUILD_SKIP"))) { + File metadataCAPP = new File(getESBResourceLocation() + File.separator + + SERVICE_CATALOG_FOLDER + File.separator + CAPP_WITH_PROXY_META); + serverConfigurationManager.copyToCarbonapps(metadataCAPP); + // replace server startup scripts + String shFile = CarbonBaseUtils.getCarbonHome() + File.separator + "bin" + File.separator + SH_FILE_NAME; + String batFile = CarbonBaseUtils.getCarbonHome() + File.separator + "bin" + File.separator + BAT_FILE_NAME; + File oldShFile = new File(shFile + ".backup"); + File newShFile = new File(shFile); + if (new File(shFile).delete() && oldShFile.renameTo(newShFile)) { + assertTrue(newShFile.exists(), "Error while replacing default sh script"); + } + File oldBatFile = new File(batFile + ".backup"); + File newBatFile = new File(batFile); + if (new File(batFile).delete() && oldBatFile.renameTo(newBatFile)) { + assertTrue(newBatFile.exists(), "Error while replacing default bat script"); + } + serverConfigurationManager.restartMicroIntegrator(); + assertTrue(Utils.checkForLog(carbonLogReader, + "Successfully updated the service catalog", 10), "Did not receive the expected info log"); + File extracted = chekAndExtractPayloadZip(); + assertTrue(extracted.exists(), "Error occurred while extracting the ZIP"); + File metadataFile = new File(extracted, "SampleProxyService_proxy_v1.0.0"); + File yamlFile = new File(metadataFile, "metadata.yaml"); + assertTrue(yamlFile.exists(), "Could not find the metadata yaml file"); + File wsdlFile = new File(metadataFile, "definition.wsdl"); + assertTrue(wsdlFile.exists(), "Could not find the definition wsdl file"); } - serverConfigurationManager.restartMicroIntegrator(); - assertTrue(Utils.checkForLog(carbonLogReader, - "Successfully updated the service catalog", 10), "Did not receive the expected info log"); - File extracted = chekAndExtractPayloadZip(); - assertTrue(extracted.exists(), "Error occurred while extracting the ZIP"); - File metadataFile = new File(extracted, "SampleProxyService_proxy_v1.0.0"); - File yamlFile = new File(metadataFile, "metadata.yaml"); - assertTrue(yamlFile.exists(), "Could not find the metadata yaml file"); - File wsdlFile = new File(metadataFile, "definition.wsdl"); - assertTrue(wsdlFile.exists(), "Could not find the definition wsdl file"); } private static File chekAndExtractPayloadZip() throws CarbonException {