diff options
author | 2020-02-17 09:48:20 +0200 | |
---|---|---|
committer | 2020-02-17 08:55:03 +0000 | |
commit | a4fd70a3a183a3ced4c46415a25d081ece8ac098 (patch) | |
tree | 6b501395489531e0d16cd35a1098a8f11208bcc1 /vid-automation/src/main/java/org | |
parent | 599bfc9cf2a435006622332f9f3e5071f64bbbd6 (diff) |
Fix intermittent test inProgressJobMoreThan24HoursIsFailedInVidAudit
Bit more time was needed.
Issue-ID: VID-647
Change-Id: Ie7e101a2eb85e71a38d1cb2efd9f7327e4705fd3
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/src/main/java/org')
-rw-r--r-- | vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java | 4 | ||||
-rw-r--r-- | vid-automation/src/main/java/org/onap/vid/api/TestUtils.java | 34 |
2 files changed, 24 insertions, 14 deletions
diff --git a/vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java b/vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java index 4475c366b..ee3982c19 100644 --- a/vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java +++ b/vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java @@ -544,7 +544,7 @@ public class AsyncInstantiationBase extends BaseMsoApiTest { .toString(); } - protected void addBulkPendingWithCustomList(List<BasePreset> customPresets){ + protected Map<Keys, String> addBulkPendingWithCustomList(List<BasePreset> customPresets){ Map<Keys, String> names = generateNames(); final int bulkSize = 2 + customPresets.size(); @@ -559,6 +559,8 @@ public class AsyncInstantiationBase extends BaseMsoApiTest { List<String> jobIds = createBulkOfMacroInstances(presets, false, bulkSize, names); Assert.assertEquals(jobIds.size(),bulkSize); + + return names; } protected void verifyAuditStatuses(String jobId, List<String> statuses, JobAuditStatus.SourceStatus source) { diff --git a/vid-automation/src/main/java/org/onap/vid/api/TestUtils.java b/vid-automation/src/main/java/org/onap/vid/api/TestUtils.java index a2fe82e9d..cc292caa7 100644 --- a/vid-automation/src/main/java/org/onap/vid/api/TestUtils.java +++ b/vid-automation/src/main/java/org/onap/vid/api/TestUtils.java @@ -1,27 +1,29 @@ package org.onap.vid.api; +import static org.apache.commons.text.CharacterPredicates.DIGITS; +import static org.apache.commons.text.CharacterPredicates.LETTERS; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.Matchers.hasEntry; +import static org.hamcrest.Matchers.hasKey; +import static org.hamcrest.Matchers.not; +import static vid.automation.test.utils.RegExMatcher.matchesRegEx; + import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; +import java.io.IOException; +import java.io.InputStream; +import java.util.Map; +import java.util.Scanner; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.Response; import org.apache.commons.text.RandomStringGenerator; import org.hamcrest.Matcher; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver; import org.springframework.http.HttpStatus; - -import javax.ws.rs.client.WebTarget; -import javax.ws.rs.core.Response; -import java.io.IOException; -import java.io.InputStream; -import java.util.Map; -import java.util.Scanner; - -import static org.apache.commons.text.CharacterPredicates.DIGITS; -import static org.apache.commons.text.CharacterPredicates.LETTERS; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.Matchers.*; -import static vid.automation.test.utils.RegExMatcher.matchesRegEx; +import org.testng.annotations.DataProvider; public class TestUtils { @@ -96,4 +98,10 @@ public class TestUtils { public static String generateRandomAlphaNumeric(int length) { return generator.generate(length); } + + @DataProvider + public static Object[][] trueAndFalse() { + return new Object[][]{{true}, {false}}; + } + } |