From 5cd8d27ba445a0dfb5fe27b3c290eb8ddb57df6f Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 19 Jun 2012 22:03:38 +0000 Subject: [PATCH] don't use assume here git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1351879 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/analysis/BaseTokenStreamTestCase.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java index 4e31ed59528..0e7d392ac63 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java +++ b/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java @@ -49,7 +49,6 @@ import org.apache.lucene.util.LineFileDocs; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.Rethrow; import org.apache.lucene.util._TestUtil; -import org.junit.Assume; /** * Base class for all Lucene unit tests that use TokenStreams. @@ -438,11 +437,11 @@ public abstract class BaseTokenStreamTestCase extends LuceneTestCase { boolean useCharFilter = random.nextBoolean(); Directory dir = null; RandomIndexWriter iw = null; - if (rarely(random)) { - final String postingsFormat = _TestUtil.getPostingsFormat("dummy"); - Assume.assumeTrue(iterations * maxWordLength < 100000 || - !(postingsFormat.equals("Memory") || - postingsFormat.equals("SimpleText"))); + final String postingsFormat = _TestUtil.getPostingsFormat("dummy"); + boolean codecOk = iterations * maxWordLength < 100000 || + !(postingsFormat.equals("Memory") || + postingsFormat.equals("SimpleText")); + if (rarely(random) && codecOk) { dir = newFSDirectory(_TestUtil.getTempDir("bttc")); iw = new RandomIndexWriter(new Random(seed), dir, a); }