mirror of https://github.com/apache/lucene.git
if classpath is wrong for preflex-rw, throw an exception up front
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1233520 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3c6d62edbb
commit
ab52c0d7ef
|
@ -283,7 +283,8 @@ public abstract class LuceneTestCase extends Assert {
|
|||
int randomVal = random.nextInt(10);
|
||||
|
||||
if ("Lucene3x".equals(TEST_CODEC) || ("random".equals(TEST_CODEC) && randomVal < 2)) { // preflex-only setup
|
||||
codec = new PreFlexRWCodec();
|
||||
codec = Codec.forName("Lucene3x");
|
||||
assert (codec instanceof PreFlexRWCodec) : "fix your classpath to have tests-framework.jar before lucene-core.jar";
|
||||
PREFLEX_IMPERSONATION_IS_ACTIVE = true;
|
||||
} else if ("SimpleText".equals(TEST_CODEC) || ("random".equals(TEST_CODEC) && randomVal == 9)) {
|
||||
codec = new SimpleTextCodec();
|
||||
|
|
Loading…
Reference in New Issue