From 6baf85c891d065374d38ce62e17ee9a180a85db5 Mon Sep 17 00:00:00 2001 From: ShammiL Date: Thu, 22 Aug 2024 09:56:45 +0530 Subject: [PATCH] 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\"}";