You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2016/02/11 14:53:05 UTC
svn commit: r1729829 -
/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasTest.java
Author: schor
Date: Thu Feb 11 13:53:04 2016
New Revision: 1729829
URL: http://svn.apache.org/viewvc?rev=1729829&view=rev
Log:
no Jira - add capability to loop the main part of this test - currently set to 1 - like former behavior. Looping is for profiling, etc.
Modified:
uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasTest.java
Modified: uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasTest.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasTest.java?rev=1729829&r1=1729828&r2=1729829&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasTest.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasTest.java Thu Feb 11 13:53:04 2016
@@ -223,18 +223,24 @@ public class GrowingTheCasTest extends T
jcas.setDocumentText(text);
int numberOfSentences = 0;
int numberOfTokens = 0;
- try {
-// long time = System.currentTimeMillis();
- this.ae.process(jcas);
-// time = System.currentTimeMillis() - time;
-// System.out.println("Time for large CAS: " + new TimeSpan(time));
- numberOfSentences = jcas.getAnnotationIndex(Sentence.type).size();
- numberOfTokens = jcas.getAnnotationIndex(Token.type).size();
-// System.out.println(numberOfSentences);
-// System.out.println(numberOfTokens);
- } catch (AnalysisEngineProcessException e) {
- e.printStackTrace();
- assertTrue(false);
+ for (int i = 0; i < 1; i++) {
+ numberOfSentences = 0;
+ numberOfTokens = 0;
+ try {
+ // long time = System.currentTimeMillis();
+ this.ae.process(jcas);
+ // time = System.currentTimeMillis() - time;
+ // System.out.println("Time for large CAS: " + new TimeSpan(time));
+ numberOfSentences = jcas.getAnnotationIndex(Sentence.type).size();
+ numberOfTokens = jcas.getAnnotationIndex(Token.type).size();
+ // System.out.println(numberOfSentences);
+ // System.out.println(numberOfTokens);
+ } catch (AnalysisEngineProcessException e) {
+ e.printStackTrace();
+ assertTrue(false);
+ }
+ jcas.reset();
+ jcas.setDocumentText(text);
}
jcas = null;