diff options
author | Chou, Joseph (jc2555) <jc2555@att.com> | 2020-03-06 10:26:56 -0500 |
---|---|---|
committer | Chou, Joseph (jc2555) <jc2555@att.com> | 2020-03-06 12:20:05 -0500 |
commit | 845cbbc74445909613aff1912d3cfc9083c57d53 (patch) | |
tree | fb620295ff1447a7b6d73573bc1a4f9d29ae086d /feature-server-pool | |
parent | 001320ed1ecbdf3b2f58d261f008f681da3f4c67 (diff) |
Add feature-server-pool to the ONAP drools-pdp repository.
Update timeout value in testcase and add logback-test.xml
Issue-ID: POLICY-2351
Change-Id: Idccf87144e137d7a0d18112a5e1442c4b04a0ac2
Signed-off-by: Joseph Chou <jc2555@att.com>
Diffstat (limited to 'feature-server-pool')
-rw-r--r-- | feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Test1.java | 5 | ||||
-rw-r--r-- | feature-server-pool/src/test/resources/logback-test.xml | 32 |
2 files changed, 35 insertions, 2 deletions
diff --git a/feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Test1.java b/feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Test1.java index 2178fec1..ad4ba8e8 100644 --- a/feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Test1.java +++ b/feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Test1.java @@ -434,9 +434,10 @@ public class Test1 { newReceiver.getServerStatic().getThisServer().getUuid().toString()); logger.info(bos.toString()); - // poll up to 10 seconds for the bucket to be updated + // poll up to 5 minutes for the bucket to be updated TestDroolsObject matchingObject = new TestDroolsObject(message); - await().atMost(50000L, TimeUnit.MILLISECONDS) + await().atMost(5, TimeUnit.MINUTES) + .with().pollInterval(Durations.ONE_SECOND) .until(() -> (new ArrayList<Object>(newReceiver.getKieSession().getObjects()) .contains(matchingObject))); diff --git a/feature-server-pool/src/test/resources/logback-test.xml b/feature-server-pool/src/test/resources/logback-test.xml new file mode 100644 index 00000000..7df374fb --- /dev/null +++ b/feature-server-pool/src/test/resources/logback-test.xml @@ -0,0 +1,32 @@ +<!-- + ============LICENSE_START======================================================= + ONAP + ================================================================================ + Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> + +<!-- Controls the output of logs for JUnit tests --> + +<configuration> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%M:%line - %msg%n</pattern> + </encoder> + </appender> + <root level="WARN"> + <appender-ref ref="STDOUT" /> + </root> +</configuration> |