diff options
3 files changed, 6 insertions, 5 deletions
diff --git a/deliveries/src/main/scripts/localize_quartz.sh b/deliveries/src/main/scripts/localize_quartz.sh index c22d8793a..e2b3a0adc 100755 --- a/deliveries/src/main/scripts/localize_quartz.sh +++ b/deliveries/src/main/scripts/localize_quartz.sh @@ -9,7 +9,7 @@ sed -e 's/${VID_MYSQL_HOST}/'${VID_MYSQL_HOST}'/g' \ -e 's/${VID_MYSQL_PORT}/'${VID_MYSQL_PORT}'/g' \ -e 's/${VID_MYSQL_DBNAME}/'${VID_MYSQL_DBNAME}'/g' \ -e 's/${VID_MYSQL_USER}/'${VID_MYSQL_USER}'/g' \ - -e 's/${VID_MYSQL_PASS}/'${VID_MYSQL_PASS}'/g' \ + -e 's/${VID_MYSQL_PASS}/'"$(printf '%q' "${VID_MYSQL_PASS}")"'/g' \ -e 's/${VID_MYSQL_MAXCONNECTIONS}/'${VID_MYSQL_MAXCONNECTIONS}'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" exit 4 diff --git a/deliveries/src/main/scripts/localize_system.sh b/deliveries/src/main/scripts/localize_system.sh index a7e6cd3ba..5061a02b3 100755 --- a/deliveries/src/main/scripts/localize_system.sh +++ b/deliveries/src/main/scripts/localize_system.sh @@ -12,7 +12,7 @@ sed -e 's/${VID_MYSQL_HOST}/'${VID_MYSQL_HOST}'/g' \ -e 's/${VID_MYSQL_PORT}/'${VID_MYSQL_PORT}'/g' \ -e 's/${VID_MYSQL_DBNAME}/'${VID_MYSQL_DBNAME}'/g' \ -e 's/${VID_MYSQL_USER}/'${VID_MYSQL_USER}'/g' \ - -e 's/${VID_MYSQL_PASS}/'${VID_MYSQL_PASS}'/g' \ + -e 's/${VID_MYSQL_PASS}/'"$(printf '%q' "${VID_MYSQL_PASS}")"'/g' \ -e 's ${VID_AAI_URL} '${VID_AAI_URL}' g' \ -e 's/${AAI_USE_CLIENT_CERT}/'${AAI_USE_CLIENT_CERT}'/g' \ -e 's/${AAI_VID_UID}/'${AAI_VID_UID}'/g' \ 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); |