LUCENE-5957: Add option for tests to not randomize codec

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1625812 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan Ernst 2014-09-17 20:39:04 +00:00
parent f2b2a710cd
commit bcf58db693
2 changed files with 6 additions and 1 deletions

View File

@ -178,6 +178,9 @@ Tests
the exact release the exact release
(Ryan Ernst, Uwe Schindler) (Ryan Ernst, Uwe Schindler)
* LUCENE-5957: Add option for tests to not randomize codec
(Ryan Ernst)
Build Build
* LUCENE-5909: Smoke tester now has better command line parsing and * LUCENE-5909: Smoke tester now has better command line parsing and

View File

@ -150,7 +150,9 @@ final class TestRuleSetupAndRestoreClassEnv extends AbstractBeforeAfterRule {
savedCodec = Codec.getDefault(); savedCodec = Codec.getDefault();
int randomVal = random.nextInt(11); int randomVal = random.nextInt(11);
if (("random".equals(TEST_POSTINGSFORMAT) == false) || ("random".equals(TEST_DOCVALUESFORMAT) == false)) { if ("default".equals(TEST_CODEC)) {
codec = savedCodec; // just use the default, don't randomize
} else if (("random".equals(TEST_POSTINGSFORMAT) == false) || ("random".equals(TEST_DOCVALUESFORMAT) == false)) {
// the user wired postings or DV: this is messy // the user wired postings or DV: this is messy
// refactor into RandomCodec.... // refactor into RandomCodec....