Fix build fails 29/66129/1
authorliamfallon <liam.fallon@ericsson.com>
Wed, 12 Sep 2018 14:40:10 +0000 (15:40 +0100)
committerliamfallon <liam.fallon@ericsson.com>
Wed, 12 Sep 2018 14:43:05 +0000 (15:43 +0100)
Apex end to end tests often fail because the tests are not tuned correctly
for Jenkins.

The JRuby test needs a delay to allow the first test to completely clear dowm
The volume of events sent in the Kafka tests is reduced from 100 to 10

The dom4j version is also changed back to 1.6.1 because 1.6 has the same security
issues.

Issue-ID: POLICY-954
Change-Id: Id38bf9fe526942870181bfd9c0762f0a471c0c02
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/pom.xml
testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/plugins/executor/test/script/engine/TestApexEngineJRuby.java
testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/apps/uservice/test/adapt/kafka/TestKafka2Kafka.java

index 1c675dc..990bc8d 100644 (file)
@@ -45,7 +45,7 @@
                 <dependency>
                     <groupId>dom4j</groupId>
                     <artifactId>dom4j</artifactId>
-                    <version>1.6</version>
+                    <version>1.6.1</version>
                 </dependency>
         <dependency>
             <groupId>org.hibernate</groupId>
index 3c0e9f9..916795d 100644 (file)
@@ -30,6 +30,7 @@ import org.onap.policy.apex.context.parameters.ContextParameterConstants;
 import org.onap.policy.apex.context.parameters.ContextParameters;
 import org.onap.policy.apex.context.parameters.SchemaParameters;
 import org.onap.policy.apex.core.engine.EngineParameters;
+import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.plugins.executor.jruby.JrubyExecutorParameters;
 import org.onap.policy.common.parameters.ParameterService;
@@ -87,6 +88,7 @@ public class TestApexEngineJRuby {
     @Test
     public void testApexEngineJRuby() throws ApexException, InterruptedException, IOException {
         new TestApexEngine("JRUBY", engineParameters);
+        ThreadUtilities.sleep(5000);
         new TestApexEngine("JRUBY", engineParameters);
     }
 }
index 9aa9ac9..b174575 100644 (file)
@@ -55,7 +55,7 @@ public class TestKafka2Kafka {
 
     private static final long MAX_TEST_LENGTH = 20000;
 
-    private static final int EVENT_COUNT = 100;
+    private static final int EVENT_COUNT = 10;
     private static final int EVENT_INTERVAL = 20;
 
     private static final String ZKHOST = "127.0.0.1";