aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test/java
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2020-03-15 16:57:24 +0200
committerIttay Stern <ittay.stern@att.com>2020-03-15 16:57:24 +0200
commit2644c8bf74580f71920c7a78224e4c40cc97d80b (patch)
tree1a3331f0af0cb83db425a7059a62b986313123d0 /vid-app-common/src/test/java
parent52167699df41fc56bdfbabfd419393bc118deb60 (diff)
Extend timeout in DB-related tests of JobsBrokerService
Issue-ID: VID-433 Change-Id: Ib33c7621c8315595a341486e475ad15a90330369 Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/test/java')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/JobsBrokerServiceTest.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/JobsBrokerServiceTest.java b/vid-app-common/src/test/java/org/onap/vid/services/JobsBrokerServiceTest.java
index db2021719..00b2b959b 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/JobsBrokerServiceTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/JobsBrokerServiceTest.java
@@ -116,6 +116,7 @@ public class JobsBrokerServiceTest extends AbstractTestNGSpringContextTests {
private final Set<Long> threadsIds = new ConcurrentSkipListSet<>();
private final long FEW = 1000;
+ private final long SOME = 2000;
private final String JOBS_SHOULD_MATCH = "the jobs that added and those that pulled must be the same";
private final String JOBS_PEEKED_SHOULD_MATCH = "the jobs that added and those that peeked must be the same";
@@ -219,7 +220,7 @@ public class JobsBrokerServiceTest extends AbstractTestNGSpringContextTests {
private Job waitForFutureOptionalJob(Future<Optional<Job>> retrievedOptionalJobFuture) {
try {
- return retrievedOptionalJobFuture.get(FEW, MILLISECONDS).orElseThrow(NoJobException::new);
+ return retrievedOptionalJobFuture.get(SOME, MILLISECONDS).orElseThrow(NoJobException::new);
} catch (TimeoutException | InterruptedException | ExecutionException e) {
throw new RuntimeException(e);
}
@@ -227,7 +228,7 @@ public class JobsBrokerServiceTest extends AbstractTestNGSpringContextTests {
private Job waitForFutureJob(Future<Job> retrievedJobFuture) {
try {
- return retrievedJobFuture.get(FEW, MILLISECONDS);
+ return retrievedJobFuture.get(SOME, MILLISECONDS);
} catch (TimeoutException | InterruptedException | ExecutionException e) {
throw new RuntimeException(e);
}
@@ -343,7 +344,7 @@ public class JobsBrokerServiceTest extends AbstractTestNGSpringContextTests {
}
@Test
- public void givenManyJobs_getThemAllThenPushBackandGet_verifySameJobs() {
+ public void givenManyJobs_getThemAllThenPushBackAndGet_verifySameJobs() {
final List<Job> retrievedJobs1 = putAndGetALotOfJobs(broker);
pushBackJobs(retrievedJobs1, broker);