Add feature-server-pool to the ONAP drools-pdp repository. 86/103286/2
authorChou, Joseph (jc2555) <jc2555@att.com>
Fri, 6 Mar 2020 15:26:56 +0000 (10:26 -0500)
committerChou, Joseph (jc2555) <jc2555@att.com>
Fri, 6 Mar 2020 17:20:05 +0000 (12:20 -0500)
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>
feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Test1.java
feature-server-pool/src/test/resources/logback-test.xml [new file with mode: 0644]

index 2178fec..ad4ba8e 100644 (file)
@@ -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 (file)
index 0000000..7df374f
--- /dev/null
@@ -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>