You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by de...@apache.org on 2014/11/04 19:58:44 UTC
svn commit: r1636690 - in
/uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test:
java/org/apache/uima/ducc/container/jd/test/
java/org/apache/uima/ducc/container/jd/test/helper/ resources/
Author: degenaro
Date: Tue Nov 4 18:58:43 2014
New Revision: 1636690
URL: http://svn.apache.org/r1636690
Log:
UIMA-4069 Redesign of JD toward the main goal of classpath separation for container (system) code.
Remove jars for JUnit testing now provided via Maven.
Added:
uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/Utilities.java (with props)
Removed:
uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/resources/ducc-user.jar
uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/resources/uimaj-as-core-2.4.2.jar
uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/resources/uimaj-as-core-2.6.0.jar
uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/resources/uimaj-core-2.4.2.jar
uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/resources/uimaj-core-2.6.0.jar
uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/resources/xstream-1.3.1.jar
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/TestDispatcher.java
uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/TestSuite.java
uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/Testing.java
uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/ThreadInfoFactory.java
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/TestDispatcher.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/TestDispatcher.java?rev=1636690&r1=1636689&r2=1636690&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/TestDispatcher.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/TestDispatcher.java Tue Nov 4 18:58:43 2014
@@ -33,6 +33,7 @@ import org.apache.uima.ducc.container.jd
import org.apache.uima.ducc.container.jd.test.helper.Testing;
import org.apache.uima.ducc.container.jd.test.helper.ThreadInfo;
import org.apache.uima.ducc.container.jd.test.helper.ThreadInfoFactory;
+import org.apache.uima.ducc.container.jd.test.helper.Utilities;
import org.apache.uima.ducc.container.net.iface.IMetaCas;
import org.apache.uima.ducc.container.net.iface.IMetaCasTransaction.Type;
import org.apache.uima.ducc.container.net.impl.MetaCasTransaction;
@@ -140,14 +141,6 @@ public class TestDispatcher {
return transCommon(dispatcher, trans, reqNo);
}
- private String[] jarList260 = {
- "/ducc-user.jar",
- "/ducc-test.jar",
- "/uimaj-as-core-2.6.0.jar",
- "/uimaj-core-2.6.0.jar",
- "/xstream-1.3.1.jar"
- };
-
// single node:pid:tid
@Test
@@ -160,7 +153,7 @@ public class TestDispatcher {
File file = new File(urlXml.getFile());
String crXml = file.getAbsolutePath();
String crCfg = null;
- JobDriverCommon.setInstance(jarList260, crXml, crCfg);
+ JobDriverCommon.setInstance(Utilities.jarList, crXml, crCfg);
int size = JobDriverCommon.getInstance().getMap().size();
debug("map size:"+size);
Dispatcher dispatcher = new Dispatcher();
@@ -203,7 +196,7 @@ public class TestDispatcher {
File file = new File(urlXml.getFile());
String crXml = file.getAbsolutePath();
String crCfg = null;
- JobDriverCommon.setInstance(jarList260, crXml, crCfg);
+ JobDriverCommon.setInstance(Utilities.jarList, crXml, crCfg);
int size = JobDriverCommon.getInstance().getMap().size();
debug("map size:"+size);
Dispatcher dispatcher = new Dispatcher();
@@ -248,7 +241,7 @@ public class TestDispatcher {
File file = new File(urlXml.getFile());
String crXml = file.getAbsolutePath();
String crCfg = null;
- JobDriverCommon.setInstance(jarList260, crXml, crCfg);
+ JobDriverCommon.setInstance(Utilities.jarList, crXml, crCfg);
int size = JobDriverCommon.getInstance().getMap().size();
debug("map size:"+size);
Dispatcher dispatcher = new Dispatcher();
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/TestSuite.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/TestSuite.java?rev=1636690&r1=1636689&r2=1636690&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/TestSuite.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/TestSuite.java Tue Nov 4 18:58:43 2014
@@ -31,6 +31,7 @@ import org.apache.uima.ducc.container.jd
import org.apache.uima.ducc.container.jd.mh.RemoteWorkerIdentity;
import org.apache.uima.ducc.container.jd.mh.impl.OperatingInfo;
import org.apache.uima.ducc.container.jd.test.helper.Testing;
+import org.apache.uima.ducc.container.jd.test.helper.Utilities;
import org.apache.uima.ducc.container.net.iface.IMetaCas;
import org.apache.uima.ducc.container.net.impl.MetaCas;
import org.junit.After;
@@ -83,22 +84,6 @@ public class TestSuite {
out_println(message);
}
}
-
- private String[] jarList242 = {
- "/ducc-test.jar",
- "/ducc-user.jar",
- "/uimaj-as-core-2.4.2.jar",
- "/uimaj-core-2.4.2.jar",
- "/xstream-1.3.1.jar"
- };
-
- private String[] jarList260 = {
- "/ducc-test.jar",
- "/ducc-user.jar",
- "/uimaj-as-core-2.6.0.jar",
- "/uimaj-core-2.6.0.jar",
- "/xstream-1.3.1.jar"
- };
private void testIncludeAll(String[] jarList, String crXml, String crCfg) {
try {
@@ -125,19 +110,7 @@ public class TestSuite {
File file = new File(urlXml.getFile());
String crXml = file.getAbsolutePath();
String crCfg = null;
- testIncludeAll(jarList242, crXml, crCfg);
- }
-
- @Test
- public void test_02() {
- if(Testing.isDisabled(this.getClass().getName())) {
- return;
- }
- URL urlXml = this.getClass().getResource("/CR100.xml");
- File file = new File(urlXml.getFile());
- String crXml = file.getAbsolutePath();
- String crCfg = null;
- testIncludeAll(jarList260, crXml, crCfg);
+ testIncludeAll(Utilities.jarList, crXml, crCfg);
}
private void testExcludeOne(String[] jarList, String crXml, String crCfg, int skip) {
@@ -170,22 +143,7 @@ public class TestSuite {
}
@Test
- public void test_03() {
- if(Testing.isDisabled(this.getClass().getName())) {
- return;
- }
- URL urlXml = this.getClass().getResource("/CR100.xml");
- File file = new File(urlXml.getFile());
- String crXml = file.getAbsolutePath();
- String crCfg = null;
- testExcludeOne(jarList242, crXml, crCfg, 2);
- for(int i=0; i<jarList242.length; i++) {
- testExcludeOne(jarList242, crXml, crCfg, i);
- }
- }
-
- @Test
- public void test_04() {
+ public void test_02() {
if(Testing.isDisabled(this.getClass().getName())) {
return;
}
@@ -193,8 +151,9 @@ public class TestSuite {
File file = new File(urlXml.getFile());
String crXml = file.getAbsolutePath();
String crCfg = null;
- for(int i=0; i<jarList260.length; i++) {
- testExcludeOne(jarList260, crXml, crCfg, i);
+ testExcludeOne(Utilities.jarList, crXml, crCfg, 2);
+ for(int i=0; i<Utilities.jarList.length; i++) {
+ testExcludeOne(Utilities.jarList, crXml, crCfg, i);
}
}
@@ -219,14 +178,13 @@ public class TestSuite {
}
@Test
- public void test_05() {
+ public void test_03() {
if(Testing.isDisabled(this.getClass().getName())) {
return;
}
String crXml = null;
String crCfg = null;
- testNoXml(jarList242, crXml, crCfg);
- testNoXml(jarList260, crXml, crCfg);
+ testNoXml(Utilities.jarList, crXml, crCfg);
}
private void getTotal(String[] jarList, String crXml, String crCfg) {
@@ -249,7 +207,7 @@ public class TestSuite {
}
@Test
- public void test_06() {
+ public void test_04() {
if(Testing.isDisabled(this.getClass().getName())) {
return;
}
@@ -257,8 +215,7 @@ public class TestSuite {
File file = new File(urlXml.getFile());
String crXml = file.getAbsolutePath();
String crCfg = null;
- getTotal(jarList242, crXml, crCfg);
- getTotal(jarList260, crXml, crCfg);
+ getTotal(Utilities.jarList, crXml, crCfg);
}
private void getMetaCas(String[] jarList, String crXml, String crCfg) {
@@ -289,7 +246,7 @@ public class TestSuite {
}
@Test
- public void test_07() {
+ public void test_05() {
if(Testing.isDisabled(this.getClass().getName())) {
return;
}
@@ -297,8 +254,7 @@ public class TestSuite {
File file = new File(urlXml.getFile());
String crXml = file.getAbsolutePath();
String crCfg = null;
- getMetaCas(jarList242, crXml, crCfg);
- getMetaCas(jarList260, crXml, crCfg);
+ getMetaCas(Utilities.jarList, crXml, crCfg);
}
private void getMetaCases(JobDriverCollectionReader jdui, int total) throws JobDriverException {
@@ -342,7 +298,7 @@ public class TestSuite {
}
@Test
- public void test_08() {
+ public void test_06() {
if(Testing.isDisabled(this.getClass().getName())) {
return;
}
@@ -350,12 +306,11 @@ public class TestSuite {
File file = new File(urlXml.getFile());
String crXml = file.getAbsolutePath();
String crCfg = null;
- getMetaCases(jarList242, crXml, crCfg, 0);
- getMetaCases(jarList260, crXml, crCfg, 0);
+ getMetaCases(Utilities.jarList, crXml, crCfg, 0);
}
@Test
- public void test_09() {
+ public void test_07() {
if(Testing.isDisabled(this.getClass().getName())) {
return;
}
@@ -363,8 +318,7 @@ public class TestSuite {
File file = new File(urlXml.getFile());
String crXml = file.getAbsolutePath();
String crCfg = null;
- getMetaCases(jarList242, crXml, crCfg, 10);
- getMetaCases(jarList260, crXml, crCfg, 10);
+ getMetaCases(Utilities.jarList, crXml, crCfg, 10);
}
@Test
@@ -377,8 +331,7 @@ public class TestSuite {
File file = new File(urlXml.getFile());
String crXml = file.getAbsolutePath();
String crCfg = null;
- String[] jarList = jarList260;
- CasManager cm = new CasManager(jarList, crXml, crCfg);
+ CasManager cm = new CasManager(Utilities.jarList, crXml, crCfg);
int total = cm.getCasManagerStats().getCrTotal();
assertTrue(total == 100);
IMetaCas metaCas = cm.getMetaCas();
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/Testing.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/Testing.java?rev=1636690&r1=1636689&r2=1636690&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/Testing.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/Testing.java Tue Nov 4 18:58:43 2014
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+*/
package org.apache.uima.ducc.container.jd.test.helper;
public class Testing {
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/ThreadInfoFactory.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/ThreadInfoFactory.java?rev=1636690&r1=1636689&r2=1636690&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/ThreadInfoFactory.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/ThreadInfoFactory.java Tue Nov 4 18:58:43 2014
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+*/
package org.apache.uima.ducc.container.jd.test.helper;
import java.util.ArrayList;
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/Utilities.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/Utilities.java?rev=1636690&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/Utilities.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/Utilities.java Tue Nov 4 18:58:43 2014
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+*/
+package org.apache.uima.ducc.container.jd.test.helper;
+
+public class Utilities {
+
+ public static String[] jarList = {
+ "/ducc-test.jar",
+ "/uima-ducc-user.jar",
+ "/uimaj-as-core.jar",
+ "/uimaj-core.jar",
+ "/xstream-1.3.1.jar"
+ };
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/helper/Utilities.java
------------------------------------------------------------------------------
svn:eol-style = native