You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2020/10/15 14:15:30 UTC
[uima-ruta] branch master-v2 updated: UIMA-6271: Ruta: option to
validate internal indexing in RutaEngine
This is an automated email from the ASF dual-hosted git repository.
pkluegl pushed a commit to branch master-v2
in repository https://gitbox.apache.org/repos/asf/uima-ruta.git
The following commit(s) were added to refs/heads/master-v2 by this push:
new 5f05845 UIMA-6271: Ruta: option to validate internal indexing in RutaEngine
5f05845 is described below
commit 5f05845d5deb758c54c4ff5ee8e60af51a196f8b
Author: Peter Klügl <pe...@averbis.com>
AuthorDate: Thu Oct 15 16:15:04 2020 +0200
UIMA-6271: Ruta: option to validate internal indexing in RutaEngine
- go back to released uimafit version and replace managedJCas fro now in test
---
ruta-core/pom.xml | 34 +++++++++++-----------
.../org/apache/uima/ruta/RutaBasicUtilsTest.java | 24 +++++++++++++--
ruta-parent/pom.xml | 2 +-
3 files changed, 39 insertions(+), 21 deletions(-)
diff --git a/ruta-core/pom.xml b/ruta-core/pom.xml
index cc4e9b9..5356837 100644
--- a/ruta-core/pom.xml
+++ b/ruta-core/pom.xml
@@ -151,23 +151,23 @@
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.uima</groupId>
- <artifactId>uimafit-junit</artifactId>
- <version>${uimafit-version}</version>
- <scope>test</scope>
- <!-- Exclude aop stuff, which is not need by uimafit and only introduces a non-asl license -->
- <exclusions>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-aop</artifactId>
- </exclusion>
- <exclusion>
- <groupId>aopalliance</groupId>
- <artifactId>aopalliance</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
+<!-- <dependency> -->
+<!-- <groupId>org.apache.uima</groupId> -->
+<!-- <artifactId>uimafit-junit</artifactId> -->
+<!-- <version>${uimafit-version}</version> -->
+<!-- <scope>test</scope> -->
+<!-- Exclude aop stuff, which is not need by uimafit and only introduces a non-asl license -->
+<!-- <exclusions> -->
+<!-- <exclusion> -->
+<!-- <groupId>org.springframework</groupId> -->
+<!-- <artifactId>spring-aop</artifactId> -->
+<!-- </exclusion> -->
+<!-- <exclusion> -->
+<!-- <groupId>aopalliance</groupId> -->
+<!-- <artifactId>aopalliance</artifactId> -->
+<!-- </exclusion> -->
+<!-- </exclusions> -->
+<!-- </dependency> -->
<dependency>
<groupId>org.slf4j</groupId>
diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/RutaBasicUtilsTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/RutaBasicUtilsTest.java
index 89e11e2..bf55a78 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/RutaBasicUtilsTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/RutaBasicUtilsTest.java
@@ -22,17 +22,35 @@ import java.util.Arrays;
import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
import org.apache.uima.cas.CAS;
-import org.apache.uima.fit.testing.junit.ManagedJCas;
+import org.apache.uima.fit.factory.JCasFactory;
import org.apache.uima.jcas.JCas;
import org.apache.uima.ruta.engine.Ruta;
import org.apache.uima.ruta.type.CW;
import org.apache.uima.ruta.type.RutaBasic;
-import org.junit.Rule;
+import org.junit.Before;
import org.junit.Test;
public class RutaBasicUtilsTest {
- public @Rule ManagedJCas managedJCas = new ManagedJCas();
+ // TODO use uimafit when released instead
+ // public @Rule ManagedJCas managedJCas = new ManagedJCas();
+
+ private static ThreadLocal<JCas> managedJCas = new ThreadLocal<>();
+
+ static {
+
+ try {
+ JCas jCas = JCasFactory.createJCas();
+ managedJCas.set(jCas);
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ @Before
+ public void setup() {
+ managedJCas.get().reset();
+ }
@Test(expected = AnalysisEngineProcessException.class)
public void testBreakOnNoBasics() throws AnalysisEngineProcessException {
diff --git a/ruta-parent/pom.xml b/ruta-parent/pom.xml
index 5f70f13..5492b12 100644
--- a/ruta-parent/pom.xml
+++ b/ruta-parent/pom.xml
@@ -131,7 +131,7 @@
Creative Commons Attribution 3.0 License.
</postNoticeText>
<uimaVersion>2.10.4</uimaVersion>
- <uimafit-version>2.5.1-SNAPSHOT</uimafit-version>
+ <uimafit-version>2.5.0</uimafit-version>
<spring-version>4.3.22.RELEASE</spring-version>
<!--
BACKWARD_COMPATIBLE_IMPLEMENTER - patch version (=.=.+)