Fixed issue 40301: High memory usage on tests using arquillian
authorJavier Armendáriz <javier.armendariz@openbravo.com>
Thu, 28 Feb 2019 19:09:58 +0100
changeset 35349 b1710472ecf0
parent 35348 ed8211bf7fdb
child 35350 660371b53c81
Fixed issue 40301: High memory usage on tests using arquillian

Adding arquillian suite extension to avoid creating the same deployment for
each test thus reducing memory impact on tests.
legal/Licensing.txt
legal/WTFPL_license.txt
modules/org.openbravo.base.weld/lib/test/arquillian-suite-extension-1.1.2.jar
modules/org.openbravo.base.weld/lib/test/reflections-0.9.8.jar
modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/WeldBaseTest.java
src-test/.classpath.template
--- a/legal/Licensing.txt	Thu Feb 28 10:53:54 2019 +0100
+++ b/legal/Licensing.txt	Thu Feb 28 19:09:58 2019 +0100
@@ -245,6 +245,7 @@
 # arquillian-core-spi-1.1.8.Final.jar
 # arquillian-junit-container-1.1.8.Final.jar
 # arquillian-junit-core-1.1.8.Final.jar
+# arquillian-suite-extension-1.1.2.jar
 # arquillian-test-api-1.1.8.Final.jar
 # arquillian-testenricher-cdi-1.0.2.Final.jar
 # arquillian-test-impl-base-1.1.8.Final.jar
@@ -267,6 +268,9 @@
 # jandex-2.0.5.Final.jar
 Under the Apache 2.0 license (included as Apache_license-2.0.txt in this folder)
 
+# reflections-0.9.8.jar
+Under the WTFPL license (included as WTFPL_license.txt in this folder)
+
 # byte-buddy-1.8.12.jar
 Under the Apache 2.0 license (included as Apache_license-2.0.txt in this folder),
 note that Byte Buddy depends on the ASM library which is distributed under a BSD license (included as ASM_BSD_license.txt in this folder)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/legal/WTFPL_license.txt	Thu Feb 28 19:09:58 2019 +0100
@@ -0,0 +1,14 @@
+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+                    Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. You just DO WHAT THE FUCK YOU WANT TO.
+
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-suite-extension-1.1.2.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/reflections-0.9.8.jar has changed
--- a/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/WeldBaseTest.java	Thu Feb 28 10:53:54 2019 +0100
+++ b/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/WeldBaseTest.java	Thu Feb 28 19:09:58 2019 +0100
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2018 Openbravo SLU
+ * All portions are Copyright (C) 2010-2019 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,6 +28,7 @@
 import javax.enterprise.util.AnnotationLiteral;
 import javax.inject.Inject;
 
+import org.eu.ingwar.tools.arquillian.extension.suite.annotations.ArquillianSuiteDeployment;
 import org.hibernate.dialect.function.SQLFunction;
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
@@ -54,6 +55,7 @@
  * @author mtaal
  */
 @RunWith(Arquillian.class)
+@ArquillianSuiteDeployment
 public class WeldBaseTest extends OBBaseTest {
   private static final Logger log = LogManager.getLogger();
 
--- a/src-test/.classpath.template	Thu Feb 28 10:53:54 2019 +0100
+++ b/src-test/.classpath.template	Thu Feb 28 19:09:58 2019 +0100
@@ -36,5 +36,7 @@
 	<classpathentry kind="lib" path="test-lib/validation-api-1.0.0.GA.jar"/>
 	<classpathentry kind="lib" path="test-lib/arquillian-config-api-1.1.8.Final.jar"/>
 	<classpathentry kind="lib" path="test-lib/arquillian-config-impl-base-1.1.8.Final.jar"/>
+	<classpathentry kind="lib" path="test-lib/arquillian-suite-extension-1.1.2.jar"/>
+	<classpathentry kind="lib" path="test-lib/reflections-0.9.8.jar"/>
 	<classpathentry kind="output" path="build/classes"/>
 </classpath>