From 028ebe812f6b07be25ba739a522dd84984998508 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Wed, 7 Dec 2011 11:57:00 +0000 Subject: [PATCH] LUCENE-3623: don't use SlowMultiReaderWrapper for SORTED_BYTES tests git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene3622@1211398 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/index/values/TestTypePromotion.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lucene/src/test/org/apache/lucene/index/values/TestTypePromotion.java b/lucene/src/test/org/apache/lucene/index/values/TestTypePromotion.java index c3d79d650df..4799f4b10e6 100644 --- a/lucene/src/test/org/apache/lucene/index/values/TestTypePromotion.java +++ b/lucene/src/test/org/apache/lucene/index/values/TestTypePromotion.java @@ -103,7 +103,9 @@ public class TestTypePromotion extends LuceneTestCase { } else { // do a real merge here IndexReader open = IndexReader.open(dir_2); - writer.addIndexes(random.nextBoolean() ? new SlowMultiReaderWrapper(open) : open); + // we cannot use SlowMR for sorted bytes, because it returns a null sortedsource + boolean useSlowMRWrapper = types != SORTED_BYTES && random.nextBoolean(); + writer.addIndexes(useSlowMRWrapper ? new SlowMultiReaderWrapper(open) : open); open.close(); } dir_2.close();