You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2016/10/11 18:34:46 UTC

[01/47] lucenenet git commit: Fixed bug in Codecs.SimpleText.SimpleTextDocValuesWriter - changed to long?.GetValueOrDefault() to match Java Lucene.

Repository: lucenenet
Updated Branches:
  refs/heads/master a57e72058 -> 686b75113


Fixed bug in Codecs.SimpleText.SimpleTextDocValuesWriter - changed to long?.GetValueOrDefault() to match Java Lucene.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/e596a4d3
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/e596a4d3
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/e596a4d3

Branch: refs/heads/master
Commit: e596a4d388ef9e79154cd43ffa7f09854dc7b653
Parents: 71ff7ee
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 4 18:58:26 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 6 16:39:41 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e596a4d3/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
index 7f19a0f..e2bd264 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
@@ -73,9 +73,9 @@ namespace Lucene.Net.Codecs.SimpleText
             var maxValue = long.MinValue;
             foreach (var n in values)
             {
-                var v = n;
-                minValue = Math.Min(minValue, v.Value); // Added .Value to account for long?
-                maxValue = Math.Max(maxValue, v.Value); // Added .Value to account for long?
+                var v = n.GetValueOrDefault();
+                minValue = Math.Min(minValue, v); // Added .Value to account for long?
+                maxValue = Math.Max(maxValue, v); // Added .Value to account for long?
             }
 
             // write our minimum value to the .dat, all entries are deltas from that


[19/47] lucenenet git commit: Core.Store.CompoundFileDirectory: Fixed issue where magic byte was not correctly represented as negative (secondByte is always negative and represents the Lucene version).

Posted by ni...@apache.org.
Core.Store.CompoundFileDirectory: Fixed issue where magic byte was not correctly represented as negative (secondByte is always negative and represents the Lucene version).


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/824ee5e0
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/824ee5e0
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/824ee5e0

Branch: refs/heads/master
Commit: 824ee5e0a720e7243d4d97603948b67e2e7f12e9
Parents: 731a4cb
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 9 01:41:06 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:21 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Store/CompoundFileDirectory.cs | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/824ee5e0/src/Lucene.Net.Core/Store/CompoundFileDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/CompoundFileDirectory.cs b/src/Lucene.Net.Core/Store/CompoundFileDirectory.cs
index 061048f..019c0f1 100644
--- a/src/Lucene.Net.Core/Store/CompoundFileDirectory.cs
+++ b/src/Lucene.Net.Core/Store/CompoundFileDirectory.cs
@@ -130,10 +130,11 @@ namespace Lucene.Net.Store
             }
         }
 
-        private static readonly byte CODEC_MAGIC_BYTE1 = (byte)Number.URShift(CodecUtil.CODEC_MAGIC, 24);
-        private static readonly byte CODEC_MAGIC_BYTE2 = (byte)Number.URShift(CodecUtil.CODEC_MAGIC, 16);
-        private static readonly byte CODEC_MAGIC_BYTE3 = (byte)Number.URShift(CodecUtil.CODEC_MAGIC, 8);
-        private static readonly byte CODEC_MAGIC_BYTE4 = unchecked((byte)CodecUtil.CODEC_MAGIC);
+        // LUCENENET NOTE: These MUST be sbyte because they can be negative
+        private static readonly sbyte CODEC_MAGIC_BYTE1 = (sbyte)Number.URShift(CodecUtil.CODEC_MAGIC, 24);
+        private static readonly sbyte CODEC_MAGIC_BYTE2 = (sbyte)Number.URShift(CodecUtil.CODEC_MAGIC, 16);
+        private static readonly sbyte CODEC_MAGIC_BYTE3 = (sbyte)Number.URShift(CodecUtil.CODEC_MAGIC, 8);
+        private static readonly sbyte CODEC_MAGIC_BYTE4 = unchecked((sbyte)CodecUtil.CODEC_MAGIC);
 
         /// <summary>
         /// Helper method that reads CFS entries from an input stream </summary>
@@ -153,9 +154,9 @@ namespace Lucene.Net.Store
                 // and separate norms/etc are outside of cfs.
                 if (firstInt == CODEC_MAGIC_BYTE1)
                 {
-                    byte secondByte = stream.ReadByte();
-                    byte thirdByte = stream.ReadByte();
-                    byte fourthByte = stream.ReadByte();
+                    sbyte secondByte = (sbyte)stream.ReadByte();
+                    sbyte thirdByte = (sbyte)stream.ReadByte();
+                    sbyte fourthByte = (sbyte)stream.ReadByte();
                     if (secondByte != CODEC_MAGIC_BYTE2 || thirdByte != CODEC_MAGIC_BYTE3 || fourthByte != CODEC_MAGIC_BYTE4)
                     {
                         throw new CorruptIndexException("Illegal/impossible header for CFS file: " + secondByte + "," + thirdByte + "," + fourthByte);


[25/47] lucenenet git commit: Added Codecs.Pulsing tests + mocks to the project

Posted by ni...@apache.org.
Added Codecs.Pulsing tests + mocks to the project


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/d5d18d00
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/d5d18d00
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/d5d18d00

Branch: refs/heads/master
Commit: d5d18d005e8aa7138e5537ca65d59a8107cfee54
Parents: 8e1656b
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 00:13:34 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:23 2016 +0700

----------------------------------------------------------------------
 .../NestedPulsingPostingsFormat.cs              |  97 ++++++
 .../Lucene.Net.TestFramework.csproj             |   1 +
 .../Lucene.Net.Tests.Codecs.csproj              |   3 +
 .../Pulsing/Test10KPulsings.cs                  | 319 +++++++++----------
 .../Pulsing/TestPulsingPostingsFormat.cs        |  44 ++-
 .../Pulsing/TestPulsingReuse.cs                 | 219 ++++++-------
 6 files changed, 379 insertions(+), 304 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d5d18d00/src/Lucene.Net.TestFramework/Codecs/NestedPulsing/NestedPulsingPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/NestedPulsing/NestedPulsingPostingsFormat.cs b/src/Lucene.Net.TestFramework/Codecs/NestedPulsing/NestedPulsingPostingsFormat.cs
new file mode 100644
index 0000000..e8c27e6
--- /dev/null
+++ b/src/Lucene.Net.TestFramework/Codecs/NestedPulsing/NestedPulsingPostingsFormat.cs
@@ -0,0 +1,97 @@
+\ufeffusing Lucene.Net.Codecs.Lucene41;
+using Lucene.Net.Codecs.Pulsing;
+using Lucene.Net.Index;
+using Lucene.Net.Util;
+
+namespace Lucene.Net.Codecs.NestedPulsing
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    /// <summary>
+    /// Pulsing(1, Pulsing(2, Lucene41))
+    /// 
+    /// @lucene.experimental
+    /// </summary>
+    // TODO: if we create PulsingPostingsBaseFormat then we
+    // can simplify this? note: I don't like the *BaseFormat
+    // hierarchy, maybe we can clean that up...
+    public class NestedPulsingPostingsFormat : PostingsFormat
+    {
+        public NestedPulsingPostingsFormat()
+            : base("NestedPulsing")
+        {
+        }
+
+        public override FieldsConsumer FieldsConsumer(SegmentWriteState state)
+        {
+            PostingsWriterBase docsWriter = null;
+            PostingsWriterBase pulsingWriterInner = null;
+            PostingsWriterBase pulsingWriter = null;
+
+            // Terms dict
+            bool success = false;
+            try
+            {
+                docsWriter = new Lucene41PostingsWriter(state);
+
+                pulsingWriterInner = new PulsingPostingsWriter(state, 2, docsWriter);
+                pulsingWriter = new PulsingPostingsWriter(state, 1, pulsingWriterInner);
+                FieldsConsumer ret = new BlockTreeTermsWriter(state, pulsingWriter,
+                    BlockTreeTermsWriter.DEFAULT_MIN_BLOCK_SIZE, BlockTreeTermsWriter.DEFAULT_MAX_BLOCK_SIZE);
+                success = true;
+                return ret;
+            }
+            finally
+            {
+                if (!success)
+                {
+                    IOUtils.CloseWhileHandlingException(docsWriter, pulsingWriterInner, pulsingWriter);
+                }
+            }
+        }
+
+        public override FieldsProducer FieldsProducer(SegmentReadState state)
+        {
+            PostingsReaderBase docsReader = null;
+            PostingsReaderBase pulsingReaderInner = null;
+            PostingsReaderBase pulsingReader = null;
+            bool success = false;
+            try
+            {
+                docsReader = new Lucene41PostingsReader(state.Directory, state.FieldInfos, state.SegmentInfo, state.Context, state.SegmentSuffix);
+                pulsingReaderInner = new PulsingPostingsReader(state, docsReader);
+                pulsingReader = new PulsingPostingsReader(state, pulsingReaderInner);
+                FieldsProducer ret = new BlockTreeTermsReader(
+                                                              state.Directory, state.FieldInfos, state.SegmentInfo,
+                                                              pulsingReader,
+                                                              state.Context,
+                                                              state.SegmentSuffix,
+                                                              state.TermsIndexDivisor);
+                success = true;
+                return ret;
+            }
+            finally
+            {
+                if (!success)
+                {
+                    IOUtils.CloseWhileHandlingException(docsReader, pulsingReaderInner, pulsingReader);
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d5d18d00/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
index bbee1e8..dd333d1 100644
--- a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
+++ b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
@@ -257,6 +257,7 @@
     <Compile Include="Codecs\MockSep\MockSingleIntFactory.cs" />
     <Compile Include="Codecs\MockSep\MockSingleIntIndexInput.cs" />
     <Compile Include="Codecs\MockSep\MockSingleIntIndexOutput.cs" />
+    <Compile Include="Codecs\NestedPulsing\NestedPulsingPostingsFormat.cs" />
     <Compile Include="Codecs\ramonly\RAMOnlyPostingsFormat.cs">
       <SubType>Code</SubType>
     </Compile>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d5d18d00/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
index db67f15..ec557a4 100644
--- a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
+++ b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
@@ -49,6 +49,9 @@
     <Compile Include="IntBlock\TestIntBlockCodec.cs" />
     <Compile Include="IntBlock\TestVariableIntBlockPostingsFormat.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Pulsing\Test10KPulsings.cs" />
+    <Compile Include="Pulsing\TestPulsingPostingsFormat.cs" />
+    <Compile Include="Pulsing\TestPulsingReuse.cs" />
     <Compile Include="Sep\TestSepPostingsFormat.cs" />
     <Compile Include="SimpleText\TestSimpleTextDocValuesFormat.cs" />
     <Compile Include="SimpleText\TestSimpleTextPostingsFormat.cs" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d5d18d00/src/Lucene.Net.Tests.Codecs/Pulsing/Test10KPulsings.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Pulsing/Test10KPulsings.cs b/src/Lucene.Net.Tests.Codecs/Pulsing/Test10KPulsings.cs
index c9fab57..71aea64 100644
--- a/src/Lucene.Net.Tests.Codecs/Pulsing/Test10KPulsings.cs
+++ b/src/Lucene.Net.Tests.Codecs/Pulsing/Test10KPulsings.cs
@@ -1,9 +1,17 @@
-\ufeffusing System.Text;
-
-namespace org.apache.lucene.codecs.pulsing
+\ufeffusing Lucene.Net.Analysis;
+using Lucene.Net.Documents;
+using Lucene.Net.Index;
+using Lucene.Net.Search;
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+using NUnit.Framework;
+using System.Globalization;
+using System.IO;
+using System.Text;
+
+namespace Lucene.Net.Codecs.Pulsing
 {
-
-	/*
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -20,164 +28,145 @@ namespace org.apache.lucene.codecs.pulsing
 	 * limitations under the License.
 	 */
 
-
-	using MockAnalyzer = org.apache.lucene.analysis.MockAnalyzer;
-	using Document = org.apache.lucene.document.Document;
-	using Field = org.apache.lucene.document.Field;
-	using FieldType = org.apache.lucene.document.FieldType;
-	using TextField = org.apache.lucene.document.TextField;
-	using DocsEnum = org.apache.lucene.index.DocsEnum;
-	using IndexOptions = org.apache.lucene.index.FieldInfo.IndexOptions;
-	using IndexReader = org.apache.lucene.index.IndexReader;
-	using MultiFields = org.apache.lucene.index.MultiFields;
-	using RandomIndexWriter = org.apache.lucene.index.RandomIndexWriter;
-	using TermsEnum = org.apache.lucene.index.TermsEnum;
-	using DocIdSetIterator = org.apache.lucene.search.DocIdSetIterator;
-	using BaseDirectoryWrapper = org.apache.lucene.store.BaseDirectoryWrapper;
-	using LuceneTestCase = org.apache.lucene.util.LuceneTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Pulses 10k terms/docs, 
-	/// originally designed to find JRE bugs (https://issues.apache.org/jira/browse/LUCENE-3335)
-	/// 
-	/// @lucene.experimental
-	/// </summary>
-//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
-//ORIGINAL LINE: @LuceneTestCase.Nightly public class Test10KPulsings extends org.apache.lucene.util.LuceneTestCase
-	public class Test10KPulsings : LuceneTestCase
-	{
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public void test10kPulsed() throws Exception
-	  public virtual void test10kPulsed()
-	  {
-		// we always run this test with pulsing codec.
-		Codec cp = TestUtil.alwaysPostingsFormat(new Pulsing41PostingsFormat(1));
-
-		File f = createTempDir("10kpulsed");
-		BaseDirectoryWrapper dir = newFSDirectory(f);
-		dir.CheckIndexOnClose = false; // we do this ourselves explicitly
-		RandomIndexWriter iw = new RandomIndexWriter(random(), dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())).setCodec(cp));
-
-		Document document = new Document();
-		FieldType ft = new FieldType(TextField.TYPE_STORED);
-
-		switch (TestUtil.Next(random(), 0, 2))
-		{
-		  case 0:
-			  ft.IndexOptions = IndexOptions.DOCS_ONLY;
-			  break;
-		  case 1:
-			  ft.IndexOptions = IndexOptions.DOCS_AND_FREQS;
-			  break;
-		  default:
-			  ft.IndexOptions = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
-			  break;
-		}
-
-		Field field = newField("field", "", ft);
-		document.add(field);
-
-		NumberFormat df = new DecimalFormat("00000", new DecimalFormatSymbols(Locale.ROOT));
-
-		for (int i = 0; i < 10050; i++)
-		{
-		  field.StringValue = df.format(i);
-		  iw.addDocument(document);
-		}
-
-		IndexReader ir = iw.Reader;
-		iw.close();
-
-		TermsEnum te = MultiFields.getTerms(ir, "field").iterator(null);
-		DocsEnum de = null;
-
-		for (int i = 0; i < 10050; i++)
-		{
-		  string expected = df.format(i);
-		  assertEquals(expected, te.next().utf8ToString());
-		  de = TestUtil.docs(random(), te, null, de, DocsEnum.FLAG_NONE);
-		  assertTrue(de.nextDoc() != DocIdSetIterator.NO_MORE_DOCS);
-		  assertEquals(DocIdSetIterator.NO_MORE_DOCS, de.nextDoc());
-		}
-		ir.close();
-
-		TestUtil.checkIndex(dir);
-		dir.close();
-	  }
-
-	  /// <summary>
-	  /// a variant, that uses pulsing, but uses a high TF to force pass thru to the underlying codec
-	  /// </summary>
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public void test10kNotPulsed() throws Exception
-	  public virtual void test10kNotPulsed()
-	  {
-		// we always run this test with pulsing codec.
-		int freqCutoff = TestUtil.Next(random(), 1, 10);
-		Codec cp = TestUtil.alwaysPostingsFormat(new Pulsing41PostingsFormat(freqCutoff));
-
-		File f = createTempDir("10knotpulsed");
-		BaseDirectoryWrapper dir = newFSDirectory(f);
-		dir.CheckIndexOnClose = false; // we do this ourselves explicitly
-		RandomIndexWriter iw = new RandomIndexWriter(random(), dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())).setCodec(cp));
-
-		Document document = new Document();
-		FieldType ft = new FieldType(TextField.TYPE_STORED);
-
-		switch (TestUtil.Next(random(), 0, 2))
-		{
-		  case 0:
-			  ft.IndexOptions = IndexOptions.DOCS_ONLY;
-			  break;
-		  case 1:
-			  ft.IndexOptions = IndexOptions.DOCS_AND_FREQS;
-			  break;
-		  default:
-			  ft.IndexOptions = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
-			  break;
-		}
-
-		Field field = newField("field", "", ft);
-		document.add(field);
-
-		NumberFormat df = new DecimalFormat("00000", new DecimalFormatSymbols(Locale.ROOT));
-
-//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
-//ORIGINAL LINE: final int freq = freqCutoff + 1;
-		int freq = freqCutoff + 1;
-
-		for (int i = 0; i < 10050; i++)
-		{
-		  StringBuilder sb = new StringBuilder();
-		  for (int j = 0; j < freq; j++)
-		  {
-			sb.Append(df.format(i));
-			sb.Append(' '); // whitespace
-		  }
-		  field.StringValue = sb.ToString();
-		  iw.addDocument(document);
-		}
-
-		IndexReader ir = iw.Reader;
-		iw.close();
-
-		TermsEnum te = MultiFields.getTerms(ir, "field").iterator(null);
-		DocsEnum de = null;
-
-		for (int i = 0; i < 10050; i++)
-		{
-		  string expected = df.format(i);
-		  assertEquals(expected, te.next().utf8ToString());
-		  de = TestUtil.docs(random(), te, null, de, DocsEnum.FLAG_NONE);
-		  assertTrue(de.nextDoc() != DocIdSetIterator.NO_MORE_DOCS);
-		  assertEquals(DocIdSetIterator.NO_MORE_DOCS, de.nextDoc());
-		}
-		ir.close();
-
-		TestUtil.checkIndex(dir);
-		dir.close();
-	  }
-	}
-
+    /// <summary>
+    /// Pulses 10k terms/docs, 
+    /// originally designed to find JRE bugs (https://issues.apache.org/jira/browse/LUCENE-3335)
+    /// 
+    /// @lucene.experimental
+    /// </summary>
+    // LUCENENET TODO: This was marked with the Nightly attribute in Java Lucene
+    public class Test10KPulsings : LuceneTestCase
+    {
+        [Test]
+        public virtual void Test10kPulsed()
+        {
+            // we always run this test with pulsing codec.
+            Codec cp = TestUtil.AlwaysPostingsFormat(new Pulsing41PostingsFormat(1));
+
+            DirectoryInfo f = CreateTempDir("10kpulsed");
+            BaseDirectoryWrapper dir = NewFSDirectory(f);
+            dir.CheckIndexOnClose = false; // we do this ourselves explicitly
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random())).SetCodec(cp));
+
+            Document document = new Document();
+            FieldType ft = new FieldType(TextField.TYPE_STORED);
+
+            switch (TestUtil.NextInt(Random(), 0, 2))
+            {
+                case 0:
+                    ft.IndexOptions = FieldInfo.IndexOptions.DOCS_ONLY;
+                    break;
+                case 1:
+                    ft.IndexOptions = FieldInfo.IndexOptions.DOCS_AND_FREQS;
+                    break;
+                default:
+                    ft.IndexOptions = FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
+                    break;
+            }
+
+            Field field = NewField("field", "", ft);
+            document.Add(field);
+
+            //NumberFormat df = new DecimalFormat("00000", new DecimalFormatSymbols(Locale.ROOT));
+
+            for (int i = 0; i < 10050; i++)
+            {
+                //field.StringValue = df.format(i);
+                field.StringValue = i.ToString("00000", CultureInfo.InvariantCulture);
+                iw.AddDocument(document);
+            }
+
+            IndexReader ir = iw.Reader;
+            iw.Dispose();
+
+            TermsEnum te = MultiFields.GetTerms(ir, "field").Iterator(null);
+            DocsEnum de = null;
+
+            for (int i = 0; i < 10050; i++)
+            {
+                //string expected = df.format(i);
+                string expected = i.ToString("00000", CultureInfo.InvariantCulture);
+                assertEquals(expected, te.Next().Utf8ToString());
+                de = TestUtil.Docs(Random(), te, null, de, DocsEnum.FLAG_NONE);
+                assertTrue(de.NextDoc() != DocIdSetIterator.NO_MORE_DOCS);
+                assertEquals(DocIdSetIterator.NO_MORE_DOCS, de.NextDoc());
+            }
+            ir.Dispose();
+
+            TestUtil.CheckIndex(dir);
+            dir.Dispose();
+        }
+
+        /// <summary>
+        /// a variant, that uses pulsing, but uses a high TF to force pass thru to the underlying codec
+        /// </summary>
+        [Test]
+        public virtual void Test10kNotPulsed()
+        {
+            // we always run this test with pulsing codec.
+            int freqCutoff = TestUtil.NextInt(Random(), 1, 10);
+            Codec cp = TestUtil.AlwaysPostingsFormat(new Pulsing41PostingsFormat(freqCutoff));
+
+            DirectoryInfo f = CreateTempDir("10knotpulsed");
+            BaseDirectoryWrapper dir = NewFSDirectory(f);
+            dir.CheckIndexOnClose = false; // we do this ourselves explicitly
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random())).SetCodec(cp));
+
+            Document document = new Document();
+            FieldType ft = new FieldType(TextField.TYPE_STORED);
+
+            switch (TestUtil.NextInt(Random(), 0, 2))
+            {
+                case 0:
+                    ft.IndexOptions = FieldInfo.IndexOptions.DOCS_ONLY;
+                    break;
+                case 1:
+                    ft.IndexOptions = FieldInfo.IndexOptions.DOCS_AND_FREQS;
+                    break;
+                default:
+                    ft.IndexOptions = FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
+                    break;
+            }
+
+            Field field = NewField("field", "", ft);
+            document.Add(field);
+
+            //NumberFormat df = new DecimalFormat("00000", new DecimalFormatSymbols(Locale.ROOT));
+
+            int freq = freqCutoff + 1;
+
+            for (int i = 0; i < 10050; i++)
+            {
+                StringBuilder sb = new StringBuilder();
+                for (int j = 0; j < freq; j++)
+                {
+                    //sb.Append(df.format(i));
+                    sb.Append(i.ToString("00000", CultureInfo.InvariantCulture));
+                    sb.Append(' '); // whitespace
+                }
+                field.StringValue = sb.ToString();
+                iw.AddDocument(document);
+            }
+
+            IndexReader ir = iw.Reader;
+            iw.Dispose();
+
+            TermsEnum te = MultiFields.GetTerms(ir, "field").Iterator(null);
+            DocsEnum de = null;
+
+            for (int i = 0; i < 10050; i++)
+            {
+                //string expected = df.format(i);
+                string expected = i.ToString("00000", CultureInfo.InvariantCulture);
+                assertEquals(expected, te.Next().Utf8ToString());
+                de = TestUtil.Docs(Random(), te, null, de, DocsEnum.FLAG_NONE);
+                assertTrue(de.NextDoc() != DocIdSetIterator.NO_MORE_DOCS);
+                assertEquals(DocIdSetIterator.NO_MORE_DOCS, de.NextDoc());
+            }
+            ir.Dispose();
+
+            TestUtil.CheckIndex(dir);
+            dir.Dispose();
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d5d18d00/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
index 249e8e1..cd6f9f2 100644
--- a/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.pulsing
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.Pulsing
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,25 +21,20 @@
 	 * limitations under the License.
 	 */
 
-	using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Tests PulsingPostingsFormat
-	/// </summary>
-	public class TestPulsingPostingsFormat : BasePostingsFormatTestCase
-	{
-	  // TODO: randomize cutoff
-	  private readonly Codec codec = TestUtil.alwaysPostingsFormat(new Pulsing41PostingsFormat());
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Tests PulsingPostingsFormat
+    /// </summary>
+    public class TestPulsingPostingsFormat : BasePostingsFormatTestCase
+    {
+        // TODO: randomize cutoff
+        private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new Pulsing41PostingsFormat());
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d5d18d00/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingReuse.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingReuse.cs b/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingReuse.cs
index f35c108..b6cc5ba 100644
--- a/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingReuse.cs
+++ b/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingReuse.cs
@@ -1,9 +1,16 @@
-\ufeffusing System.Collections.Generic;
-
-namespace org.apache.lucene.codecs.pulsing
+\ufeffusing Lucene.Net.Analysis;
+using Lucene.Net.Codecs.NestedPulsing;
+using Lucene.Net.Documents;
+using Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Support;
+using Lucene.Net.Util;
+using NUnit.Framework;
+using System.Collections.Generic;
+
+namespace Lucene.Net.Codecs.Pulsing
 {
-
-	/*
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -20,115 +27,95 @@ namespace org.apache.lucene.codecs.pulsing
 	 * limitations under the License.
 	 */
 
-
-	using MockAnalyzer = org.apache.lucene.analysis.MockAnalyzer;
-	using NestedPulsingPostingsFormat = org.apache.lucene.codecs.nestedpulsing.NestedPulsingPostingsFormat;
-	using Document = org.apache.lucene.document.Document;
-	using Field = org.apache.lucene.document.Field;
-	using TextField = org.apache.lucene.document.TextField;
-	using AtomicReader = org.apache.lucene.index.AtomicReader;
-	using DirectoryReader = org.apache.lucene.index.DirectoryReader;
-	using DocsAndPositionsEnum = org.apache.lucene.index.DocsAndPositionsEnum;
-	using DocsEnum = org.apache.lucene.index.DocsEnum;
-	using RandomIndexWriter = org.apache.lucene.index.RandomIndexWriter;
-	using TermsEnum = org.apache.lucene.index.TermsEnum;
-	using BaseDirectoryWrapper = org.apache.lucene.store.BaseDirectoryWrapper;
-	using Directory = org.apache.lucene.store.Directory;
-	using LuceneTestCase = org.apache.lucene.util.LuceneTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Tests that pulsing codec reuses its enums and wrapped enums
-	/// </summary>
-	public class TestPulsingReuse : LuceneTestCase
-	{
-	  // TODO: this is a basic test. this thing is complicated, add more
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public void testSophisticatedReuse() throws Exception
-	  public virtual void testSophisticatedReuse()
-	  {
-		// we always run this test with pulsing codec.
-		Codec cp = TestUtil.alwaysPostingsFormat(new Pulsing41PostingsFormat(1));
-		Directory dir = newDirectory();
-		RandomIndexWriter iw = new RandomIndexWriter(random(), dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())).setCodec(cp));
-		Document doc = new Document();
-		doc.add(new TextField("foo", "a b b c c c d e f g g h i i j j k", Field.Store.NO));
-		iw.addDocument(doc);
-		DirectoryReader ir = iw.Reader;
-		iw.close();
-
-		AtomicReader segment = getOnlySegmentReader(ir);
-		DocsEnum reuse = null;
-		IDictionary<DocsEnum, bool?> allEnums = new IdentityHashMap<DocsEnum, bool?>();
-		TermsEnum te = segment.terms("foo").iterator(null);
-		while (te.next() != null)
-		{
-		  reuse = te.docs(null, reuse, DocsEnum.FLAG_NONE);
-		  allEnums[reuse] = true;
-		}
-
-		assertEquals(2, allEnums.Count);
-
-		allEnums.Clear();
-		DocsAndPositionsEnum posReuse = null;
-		te = segment.terms("foo").iterator(null);
-		while (te.next() != null)
-		{
-		  posReuse = te.docsAndPositions(null, posReuse);
-		  allEnums[posReuse] = true;
-		}
-
-		assertEquals(2, allEnums.Count);
-
-		ir.close();
-		dir.close();
-	  }
-
-	  /// <summary>
-	  /// tests reuse with Pulsing1(Pulsing2(Standard)) </summary>
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public void testNestedPulsing() throws Exception
-	  public virtual void testNestedPulsing()
-	  {
-		// we always run this test with pulsing codec.
-		Codec cp = TestUtil.alwaysPostingsFormat(new NestedPulsingPostingsFormat());
-		BaseDirectoryWrapper dir = newDirectory();
-		RandomIndexWriter iw = new RandomIndexWriter(random(), dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())).setCodec(cp));
-		Document doc = new Document();
-		doc.add(new TextField("foo", "a b b c c c d e f g g g h i i j j k l l m m m", Field.Store.NO));
-		// note: the reuse is imperfect, here we would have 4 enums (lost reuse when we get an enum for 'm')
-		// this is because we only track the 'last' enum we reused (not all).
-		// but this seems 'good enough' for now.
-		iw.addDocument(doc);
-		DirectoryReader ir = iw.Reader;
-		iw.close();
-
-		AtomicReader segment = getOnlySegmentReader(ir);
-		DocsEnum reuse = null;
-		IDictionary<DocsEnum, bool?> allEnums = new IdentityHashMap<DocsEnum, bool?>();
-		TermsEnum te = segment.terms("foo").iterator(null);
-		while (te.next() != null)
-		{
-		  reuse = te.docs(null, reuse, DocsEnum.FLAG_NONE);
-		  allEnums[reuse] = true;
-		}
-
-		assertEquals(4, allEnums.Count);
-
-		allEnums.Clear();
-		DocsAndPositionsEnum posReuse = null;
-		te = segment.terms("foo").iterator(null);
-		while (te.next() != null)
-		{
-		  posReuse = te.docsAndPositions(null, posReuse);
-		  allEnums[posReuse] = true;
-		}
-
-		assertEquals(4, allEnums.Count);
-
-		ir.close();
-		dir.close();
-	  }
-	}
-
+    /// <summary>
+    /// Tests that pulsing codec reuses its enums and wrapped enums
+    /// </summary>
+    public class TestPulsingReuse : LuceneTestCase
+    {
+        // TODO: this is a basic test. this thing is complicated, add more
+        [Test]
+        public virtual void TestSophisticatedReuse()
+        {
+            // we always run this test with pulsing codec.
+            Codec cp = TestUtil.AlwaysPostingsFormat(new Pulsing41PostingsFormat(1));
+            Directory dir = NewDirectory();
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random())).SetCodec(cp));
+            Document doc = new Document();
+            doc.Add(new TextField("foo", "a b b c c c d e f g g h i i j j k", Field.Store.NO));
+            iw.AddDocument(doc);
+            DirectoryReader ir = iw.Reader;
+            iw.Dispose();
+
+            AtomicReader segment = GetOnlySegmentReader(ir);
+            DocsEnum reuse = null;
+            IDictionary<DocsEnum, bool?> allEnums = new IdentityHashMap<DocsEnum, bool?>();
+            TermsEnum te = segment.Terms("foo").Iterator(null);
+            while (te.Next() != null)
+            {
+                reuse = te.Docs(null, reuse, DocsEnum.FLAG_NONE);
+                allEnums[reuse] = true;
+            }
+
+            assertEquals(2, allEnums.Count);
+
+            allEnums.Clear();
+            DocsAndPositionsEnum posReuse = null;
+            te = segment.Terms("foo").Iterator(null);
+            while (te.Next() != null)
+            {
+                posReuse = te.DocsAndPositions(null, posReuse);
+                allEnums[posReuse] = true;
+            }
+
+            assertEquals(2, allEnums.Count);
+
+            ir.Dispose();
+            dir.Dispose();
+        }
+
+        /// <summary>
+        /// tests reuse with Pulsing1(Pulsing2(Standard)) </summary>
+        [Test]
+        public virtual void TestNestedPulsing()
+        {
+            // we always run this test with pulsing codec.
+            Codec cp = TestUtil.AlwaysPostingsFormat(new NestedPulsingPostingsFormat());
+            BaseDirectoryWrapper dir = NewDirectory();
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random())).SetCodec(cp));
+            Document doc = new Document();
+            doc.Add(new TextField("foo", "a b b c c c d e f g g g h i i j j k l l m m m", Field.Store.NO));
+            // note: the reuse is imperfect, here we would have 4 enums (lost reuse when we get an enum for 'm')
+            // this is because we only track the 'last' enum we reused (not all).
+            // but this seems 'good enough' for now.
+            iw.AddDocument(doc);
+            DirectoryReader ir = iw.Reader;
+            iw.Dispose();
+
+            AtomicReader segment = GetOnlySegmentReader(ir);
+            DocsEnum reuse = null;
+            IDictionary<DocsEnum, bool?> allEnums = new IdentityHashMap<DocsEnum, bool?>();
+            TermsEnum te = segment.Terms("foo").Iterator(null);
+            while (te.Next() != null)
+            {
+                reuse = te.Docs(null, reuse, DocsEnum.FLAG_NONE);
+                allEnums[reuse] = true;
+            }
+
+            assertEquals(4, allEnums.Count);
+
+            allEnums.Clear();
+            DocsAndPositionsEnum posReuse = null;
+            te = segment.Terms("foo").Iterator(null);
+            while (te.Next() != null)
+            {
+                posReuse = te.DocsAndPositions(null, posReuse);
+                allEnums[posReuse] = true;
+            }
+
+            assertEquals(4, allEnums.Count);
+
+            ir.Dispose();
+            dir.Dispose();
+        }
+    }
 }
\ No newline at end of file


[06/47] lucenenet git commit: Fixed bug in Codecs.SimpleText.SimpleTextStoredFieldsWriter.Dispose(): if disposing, should dispose, not return.

Posted by ni...@apache.org.
Fixed bug in Codecs.SimpleText.SimpleTextStoredFieldsWriter.Dispose(): if disposing, should dispose, not return.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/9a1fa379
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/9a1fa379
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/9a1fa379

Branch: refs/heads/master
Commit: 9a1fa379631dc05d913da8e20f7724f1740e00e6
Parents: 4ec42c4
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Thu Oct 6 23:20:01 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sat Oct 8 17:15:40 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9a1fa379/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
index 396de05..7f0fb50 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
@@ -209,7 +209,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
 	    protected override void Dispose(bool disposing)
 	    {
-	        if (disposing) return;
+	        if (!disposing) return;
 	        try
 	        {
 	            IOUtils.Close(_output);


[35/47] lucenenet git commit: Made Core.Util.BaseSortTestCase test methods virtual.

Posted by ni...@apache.org.
Made Core.Util.BaseSortTestCase test methods virtual.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/964fca63
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/964fca63
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/964fca63

Branch: refs/heads/master
Commit: 964fca6318ab4ed0806d608b50f2f6cf6edcd968
Parents: bd64873
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 01:02:26 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Oct 12 01:10:54 2016 +0700

----------------------------------------------------------------------
 .../core/Util/BaseSortTestCase.cs                 | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/964fca63/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs b/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
index 2936715..dd31909 100644
--- a/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
+++ b/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
@@ -154,55 +154,55 @@ namespace Lucene.Net.Util
         }
 
         [Test]
-        public void TestEmpty()
+        public virtual void TestEmpty()
         {
             SortTest(new Entry[0]);
         }
 
         [Test]
-        public void TestOne()
+        public virtual void TestOne()
         {
             DoTest(RandomStrategy, 1);
         }
 
         [Test]
-        public void TestTwo()
+        public virtual void TestTwo()
         {
             DoTest(RandomStrategy, 2);
         }
 
         [Test]
-        public void TestRandom()
+        public virtual void TestRandom()
         {
             DoTest(RandomStrategy);
         }
 
         [Test]
-        public void TestRandomLowCardinality()
+        public virtual void TestRandomLowCardinality()
         {
             DoTest(RandomLowCardinalityStrategy, 2);
         }
 
         [Test]
-        public void TestAscending()
+        public virtual void TestAscending()
         {
             DoTest(AscendingStrategy, 2);
         }
 
         [Test]
-        public void TestAscendingSequences()
+        public virtual void TestAscendingSequences()
         {
             DoTest(AscendingSequencesStrategy, 2);
         }
 
         [Test]
-        public void TestDescending()
+        public virtual void TestDescending()
         {
             DoTest(DescendingStrategy, 2);
         }
 
         [Test]
-        public void TestStrictlyDescendingStrategy()
+        public virtual void TestStrictlyDescendingStrategy()
         {
             DoTest(StrictlyDescendingStrategy, 2);
         }


[14/47] lucenenet git commit: Added Codecs.DiskDv tests to the project

Posted by ni...@apache.org.
Added Codecs.DiskDv tests to the project


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/92c3a072
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/92c3a072
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/92c3a072

Branch: refs/heads/master
Commit: 92c3a072b6bbaae15a1291e080d7fbe1b4ac9d36
Parents: 868616b
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 10 23:36:55 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:20 2016 +0700

----------------------------------------------------------------------
 .../DiskDv/TestDiskDocValuesFormat.cs           | 67 ++++++++++----------
 1 file changed, 33 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/92c3a072/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
index 42eae1f..a0b868b 100644
--- a/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
@@ -1,41 +1,40 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Lucene.Net.Codecs.DiskDV;
+\ufeffusing NUnit.Framework;
 
 namespace Lucene.Net.Codecs.DiskDV
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-	using BaseCompressingDocValuesFormatTestCase = Lucene.Net.Index.BaseCompressingDocValuesFormatTestCase;
-	using TestUtil = Lucene.Net.Util.TestUtil;
+    using BaseCompressingDocValuesFormatTestCase = Lucene.Net.Index.BaseCompressingDocValuesFormatTestCase;
+    using TestUtil = Lucene.Net.Util.TestUtil;
 
-	/// <summary>
-	/// Tests DiskDocValuesFormat
-	/// </summary>
-	public class TestDiskDocValuesFormat : BaseCompressingDocValuesFormatTestCase
-	{
-	  private readonly Codec codec = TestUtil.AlwaysDocValuesFormat(new DiskDocValuesFormat());
+    /// <summary>
+    /// Tests DiskDocValuesFormat
+    /// </summary>
+    public class TestDiskDocValuesFormat : BaseCompressingDocValuesFormatTestCase
+    {
+        private readonly Codec codec = TestUtil.AlwaysDocValuesFormat(new DiskDocValuesFormat());
 
-	  protected override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file


[20/47] lucenenet git commit: Fixed missing call to AddBinaryField that caused many Codecs.DiskDv tests to fail.

Posted by ni...@apache.org.
Fixed missing call to AddBinaryField that caused many Codecs.DiskDv tests to fail.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/c4bd905f
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/c4bd905f
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/c4bd905f

Branch: refs/heads/master
Commit: c4bd905f2ff600c412a4310b8d9d1ee2a579f7cd
Parents: 824ee5e
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 9 01:42:22 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:21 2016 +0700

----------------------------------------------------------------------
 .../DiskDV/DiskDocValuesFormat.cs               | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c4bd905f/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs b/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs
index 75dd484..0448ef4 100644
--- a/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs
+++ b/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs
@@ -22,6 +22,8 @@ namespace Lucene.Net.Codecs.DiskDV
     using Lucene45;
     using Index;
     using System;
+    using Util;
+    using System.Collections.Generic;
 
     /// <summary>
     /// DocValues format that keeps most things on disk.
@@ -43,7 +45,23 @@ namespace Lucene.Net.Codecs.DiskDV
 
         public override DocValuesConsumer FieldsConsumer(SegmentWriteState state)
         {
-            return new Lucene45DocValuesConsumer(state, DATA_CODEC, DATA_EXTENSION, META_CODEC, META_EXTENSION);
+            return new Lucene45DocValuesConsumerAnonymousHelper(this, state);
+        }
+
+        private class Lucene45DocValuesConsumerAnonymousHelper : Lucene45DocValuesConsumer
+        {
+            private readonly DiskDocValuesFormat outerInstance;
+
+            public Lucene45DocValuesConsumerAnonymousHelper(DiskDocValuesFormat outerInstance, SegmentWriteState state)
+                : base(state, DATA_CODEC, DATA_EXTENSION, META_CODEC, META_EXTENSION)
+            {
+                this.outerInstance = outerInstance;
+            }
+
+            protected override void AddTermsDict(FieldInfo field, IEnumerable<BytesRef> values)
+            {
+                AddBinaryField(field, values);
+            }
         }
 
         public override DocValuesProducer FieldsProducer(SegmentReadState state)


[24/47] lucenenet git commit: Added Codecs.IntBlock tests + mocks to the project

Posted by ni...@apache.org.
Added Codecs.IntBlock tests + mocks to the project


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/8e1656b9
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/8e1656b9
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/8e1656b9

Branch: refs/heads/master
Commit: 8e1656b953a0b0d21e5771e7efa34af21adb3214
Parents: 4137444
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 00:08:12 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:23 2016 +0700

----------------------------------------------------------------------
 .../MockFixedIntBlockPostingsFormat.cs          | 251 +++++++++++++++++
 .../MockVariableIntBlockPostingsFormat.cs       | 279 +++++++++++++++++++
 .../Lucene.Net.TestFramework.csproj             |   2 +
 .../IntBlock/TestFixedIntBlockPostingsFormat.cs |  44 ++-
 .../IntBlock/TestIntBlockCodec.cs               |  92 +++---
 .../TestVariableIntBlockPostingsFormat.cs       |  48 ++--
 .../Lucene.Net.Tests.Codecs.csproj              |   3 +
 7 files changed, 625 insertions(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1656b9/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs b/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs
new file mode 100644
index 0000000..fc15dd0
--- /dev/null
+++ b/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs
@@ -0,0 +1,251 @@
+\ufeffusing Lucene.Net.Codecs.BlockTerms;
+using Lucene.Net.Codecs.Sep;
+using Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+
+namespace Lucene.Net.Codecs.IntBlock
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    /// <summary>
+    /// A silly test codec to verify core support for fixed
+    /// sized int block encoders is working.The int encoder
+    /// used here just writes each block as a series of vInt.
+    /// </summary>
+    public sealed class MockFixedIntBlockPostingsFormat : PostingsFormat
+    {
+        private readonly int blockSize;
+
+        public MockFixedIntBlockPostingsFormat()
+            : this(1)
+        {
+        }
+
+        public MockFixedIntBlockPostingsFormat(int blockSize)
+            : base("MockFixedIntBlock")
+        {
+            this.blockSize = blockSize;
+        }
+
+        public override string ToString()
+        {
+            return Name + "(blockSize=" + blockSize + ")";
+        }
+
+        // only for testing
+        public IntStreamFactory getIntFactory()
+        {
+            return new MockIntFactory(blockSize);
+        }
+
+        /**
+         * Encodes blocks as vInts of a fixed block size.
+         */
+        public class MockIntFactory : IntStreamFactory
+        {
+            private readonly int blockSize;
+
+            public MockIntFactory(int blockSize)
+            {
+                this.blockSize = blockSize;
+            }
+
+            public override IntIndexInput OpenInput(Directory dir, string fileName, IOContext context)
+            {
+                return new FixedIntBlockIndexInputAnonymousHelper(this, dir.OpenInput(fileName, context));
+            }
+
+            private class FixedIntBlockIndexInputAnonymousHelper : FixedIntBlockIndexInput
+            {
+                private readonly MockIntFactory outerInstance;
+
+                public FixedIntBlockIndexInputAnonymousHelper(MockIntFactory outerInstance, IndexInput input)
+                    : base(input)
+                {
+                    this.outerInstance = outerInstance;
+                }
+
+                protected override IBlockReader GetBlockReader(IndexInput @in, int[] buffer)
+                {
+                    return new BlockReaderAnonymousHelper(outerInstance, @in, buffer);
+                }
+
+                private class BlockReaderAnonymousHelper : FixedIntBlockIndexInput.IBlockReader
+                {
+                    private readonly MockIntFactory outerInstance;
+                    private readonly IndexInput @in;
+                    private readonly int[] buffer;
+
+                    public BlockReaderAnonymousHelper(MockIntFactory outerInstance, IndexInput @in, int[] buffer)
+                    {
+                        this.outerInstance = outerInstance;
+                        this.@in = @in;
+                        this.buffer = buffer;
+                    }
+                    public void Seek(long pos)
+                    {
+                    }
+
+                    public void ReadBlock()
+                    {
+                        for (int i = 0; i < buffer.Length; i++)
+                        {
+                            buffer[i] = @in.ReadVInt();
+                        }
+                    }
+                }
+            }
+
+
+            public override IntIndexOutput CreateOutput(Directory dir, string fileName, IOContext context)
+            {
+                IndexOutput output = dir.CreateOutput(fileName, context);
+                bool success = false;
+                try
+                {
+                    FixedIntBlockIndexOutputAnonymousHelper ret = new FixedIntBlockIndexOutputAnonymousHelper(output, blockSize);
+
+                    success = true;
+                    return ret;
+                }
+                finally
+                {
+                    if (!success)
+                    {
+                        IOUtils.CloseWhileHandlingException(output);
+                    }
+                }
+            }
+        }
+
+        private class FixedIntBlockIndexOutputAnonymousHelper : FixedIntBlockIndexOutput
+        {
+            public FixedIntBlockIndexOutputAnonymousHelper(IndexOutput output, int blockSize)
+                : base(output, blockSize)
+            {
+            }
+            protected override void FlushBlock()
+            {
+                for (int i = 0; i < buffer.Length; i++)
+                {
+                    output.WriteVInt(buffer[i]);
+                }
+            }
+        }
+
+        public override FieldsConsumer FieldsConsumer(SegmentWriteState state)
+        {
+            PostingsWriterBase postingsWriter = new SepPostingsWriter(state, new MockIntFactory(blockSize));
+
+            bool success = false;
+            TermsIndexWriterBase indexWriter;
+            try
+            {
+                indexWriter = new FixedGapTermsIndexWriter(state);
+                success = true;
+            }
+            finally
+            {
+                if (!success)
+                {
+                    postingsWriter.Dispose();
+                }
+            }
+
+            success = false;
+            try
+            {
+                FieldsConsumer ret = new BlockTermsWriter(indexWriter, state, postingsWriter);
+                success = true;
+                return ret;
+            }
+            finally
+            {
+                if (!success)
+                {
+                    try
+                    {
+                        postingsWriter.Dispose();
+                    }
+                    finally
+                    {
+                        indexWriter.Dispose();
+                    }
+                }
+            }
+        }
+
+        public override FieldsProducer FieldsProducer(SegmentReadState state)
+        {
+            PostingsReaderBase postingsReader = new SepPostingsReader(state.Directory,
+                                                                      state.FieldInfos,
+                                                                      state.SegmentInfo,
+                                                                      state.Context,
+                                                                      new MockIntFactory(blockSize), state.SegmentSuffix);
+
+            TermsIndexReaderBase indexReader;
+            bool success = false;
+            try
+            {
+                indexReader = new FixedGapTermsIndexReader(state.Directory,
+                                                                 state.FieldInfos,
+                                                                 state.SegmentInfo.Name,
+                                                                 state.TermsIndexDivisor,
+                                                                 BytesRef.UTF8SortedAsUnicodeComparer, state.SegmentSuffix,
+                                                                 IOContext.DEFAULT);
+                success = true;
+            }
+            finally
+            {
+                if (!success)
+                {
+                    postingsReader.Dispose();
+                }
+            }
+
+            success = false;
+            try
+            {
+                FieldsProducer ret = new BlockTermsReader(indexReader,
+                                                          state.Directory,
+                                                          state.FieldInfos,
+                                                          state.SegmentInfo,
+                                                          postingsReader,
+                                                          state.Context,
+                                                          state.SegmentSuffix);
+                success = true;
+                return ret;
+            }
+            finally
+            {
+                if (!success)
+                {
+                    try
+                    {
+                        postingsReader.Dispose();
+                    }
+                    finally
+                    {
+                        indexReader.Dispose();
+                    }
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1656b9/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs b/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs
new file mode 100644
index 0000000..eeba725
--- /dev/null
+++ b/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs
@@ -0,0 +1,279 @@
+\ufeffusing Lucene.Net.Codecs.BlockTerms;
+using Lucene.Net.Codecs.Sep;
+using Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+using System.Diagnostics;
+
+namespace Lucene.Net.Codecs.IntBlock
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    /// <summary>
+    /// A silly test codec to verify core support for variable
+    /// sized int block encoders is working.The int encoder
+    /// used here writes baseBlockSize ints at once, if the first
+    /// int is &lt;= 3, else 2* baseBlockSize.
+    /// </summary>
+    public class MockVariableIntBlockPostingsFormat : PostingsFormat
+    {
+        private readonly int baseBlockSize;
+
+        public MockVariableIntBlockPostingsFormat()
+            : this(1)
+        {
+
+        }
+
+        public MockVariableIntBlockPostingsFormat(int baseBlockSize)
+            : base("MockVariableIntBlock")
+        {
+            this.baseBlockSize = baseBlockSize;
+        }
+
+        public override string ToString()
+        {
+            return Name + "(baseBlockSize=" + baseBlockSize + ")";
+        }
+
+        /**
+         * If the first value is &lt;= 3, writes baseBlockSize vInts at once,
+         * otherwise writes 2*baseBlockSize vInts.
+         */
+        public class MockIntFactory : IntStreamFactory
+        {
+
+            private readonly int baseBlockSize;
+
+            public MockIntFactory(int baseBlockSize)
+            {
+                this.baseBlockSize = baseBlockSize;
+            }
+
+            public override IntIndexInput OpenInput(Directory dir, string fileName, IOContext context)
+            {
+                IndexInput input = dir.OpenInput(fileName, context);
+                int baseBlockSize = input.ReadInt();
+                return new VariableIntBlockIndexInputAnonymousHelper(input, baseBlockSize);
+            }
+
+            private class VariableIntBlockIndexInputAnonymousHelper : VariableIntBlockIndexInput
+            {
+                private readonly int baseBlockSize;
+
+                public VariableIntBlockIndexInputAnonymousHelper(IndexInput input, int baseBlockSize)
+                    : base(input)
+                {
+                    this.baseBlockSize = baseBlockSize;
+                }
+                protected override IBlockReader GetBlockReader(IndexInput @in, int[] buffer)
+                {
+                    return new BlockReaderAnonymousHelper(@in, buffer, baseBlockSize);
+                }
+
+                private class BlockReaderAnonymousHelper : IBlockReader
+                {
+                    private readonly IndexInput input;
+                    private readonly int[] buffer;
+                    private readonly int baseBlockSize;
+
+                    public BlockReaderAnonymousHelper(IndexInput input, int[] buffer, int baseBlockSize)
+                    {
+                        this.input = input;
+                        this.buffer = buffer;
+                        this.baseBlockSize = baseBlockSize;
+                    }
+
+                    public void Seek(long pos)
+                    {
+                    }
+
+                    public int ReadBlock()
+                    {
+                        buffer[0] = input.ReadVInt();
+                        int count = buffer[0] <= 3 ? baseBlockSize - 1 : 2 * baseBlockSize - 1;
+                        Debug.Assert(buffer.Length >= count, "buffer.length=" + buffer.Length + " count=" + count);
+                        for (int i = 0; i < count; i++)
+                        {
+                            buffer[i + 1] = input.ReadVInt();
+                        }
+                        return 1 + count;
+                    }
+                }
+            }
+
+            public override IntIndexOutput CreateOutput(Directory dir, string fileName, IOContext context)
+            {
+                IndexOutput output = dir.CreateOutput(fileName, context);
+                bool success = false;
+                try
+                {
+                    output.WriteInt(baseBlockSize);
+                    VariableIntBlockIndexOutput ret = new VariableIntBlockIndexOutputAnonymousHelper(output, 2 * baseBlockSize);
+                    success = true;
+                    return ret;
+                }
+                finally
+                {
+                    if (!success)
+                    {
+                        IOUtils.CloseWhileHandlingException(output);
+                    }
+                }
+            }
+        }
+
+        private class VariableIntBlockIndexOutputAnonymousHelper : VariableIntBlockIndexOutput
+        {
+            private readonly int baseBlockSize;
+            public VariableIntBlockIndexOutputAnonymousHelper(IndexOutput output, int baseBlockSize)
+                : base(output, baseBlockSize)
+            {
+                this.baseBlockSize = baseBlockSize;
+                this.buffer = new int[2 + 2 * baseBlockSize];
+            }
+
+            private int pendingCount;
+            private readonly int[] buffer;
+
+            protected override int Add(int value)
+            {
+                buffer[pendingCount++] = value;
+                // silly variable block length int encoder: if
+                // first value <= 3, we write N vints at once;
+                // else, 2*N
+                int flushAt = buffer[0] <= 3 ? baseBlockSize : 2 * baseBlockSize;
+
+                // intentionally be non-causal here:
+                if (pendingCount == flushAt + 1)
+                {
+                    for (int i = 0; i < flushAt; i++)
+                    {
+                        output.WriteVInt(buffer[i]);
+                    }
+                    buffer[0] = buffer[flushAt];
+                    pendingCount = 1;
+                    return flushAt;
+                }
+                else
+                {
+                    return 0;
+                }
+            }
+        }
+
+        public override FieldsConsumer FieldsConsumer(SegmentWriteState state)
+        {
+            PostingsWriterBase postingsWriter = new SepPostingsWriter(state, new MockIntFactory(baseBlockSize));
+
+            bool success = false;
+            TermsIndexWriterBase indexWriter;
+            try
+            {
+                indexWriter = new FixedGapTermsIndexWriter(state);
+                success = true;
+            }
+            finally
+            {
+                if (!success)
+                {
+                    postingsWriter.Dispose();
+                }
+            }
+
+            success = false;
+            try
+            {
+                FieldsConsumer ret = new BlockTermsWriter(indexWriter, state, postingsWriter);
+                success = true;
+                return ret;
+            }
+            finally
+            {
+                if (!success)
+                {
+                    try
+                    {
+                        postingsWriter.Dispose();
+                    }
+                    finally
+                    {
+                        indexWriter.Dispose();
+                    }
+                }
+            }
+        }
+
+        public override FieldsProducer FieldsProducer(SegmentReadState state)
+        {
+            PostingsReaderBase postingsReader = new SepPostingsReader(state.Directory,
+                                                                      state.FieldInfos,
+                                                                      state.SegmentInfo,
+                                                                      state.Context,
+                                                                      new MockIntFactory(baseBlockSize), state.SegmentSuffix);
+
+            TermsIndexReaderBase indexReader;
+            bool success = false;
+            try
+            {
+                indexReader = new FixedGapTermsIndexReader(state.Directory,
+                                                                 state.FieldInfos,
+                                                                 state.SegmentInfo.Name,
+                                                                 state.TermsIndexDivisor,
+                                                                 BytesRef.UTF8SortedAsUnicodeComparer,
+                                                                 state.SegmentSuffix, state.Context);
+                success = true;
+            }
+            finally
+            {
+                if (!success)
+                {
+                    postingsReader.Dispose();
+                }
+            }
+
+            success = false;
+            try
+            {
+                FieldsProducer ret = new BlockTermsReader(indexReader,
+                                                          state.Directory,
+                                                          state.FieldInfos,
+                                                          state.SegmentInfo,
+                                                          postingsReader,
+                                                          state.Context,
+                                                          state.SegmentSuffix);
+                success = true;
+                return ret;
+            }
+            finally
+            {
+                if (!success)
+                {
+                    try
+                    {
+                        postingsReader.Dispose();
+                    }
+                    finally
+                    {
+                        indexReader.Dispose();
+                    }
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1656b9/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
index 66be25c..bbee1e8 100644
--- a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
+++ b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
@@ -251,6 +251,8 @@
     <Compile Include="Codecs\MissingOrdRemapper.cs">
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="Codecs\MockIntBlock\MockFixedIntBlockPostingsFormat.cs" />
+    <Compile Include="Codecs\MockIntBlock\MockVariableIntBlockPostingsFormat.cs" />
     <Compile Include="Codecs\MockSep\MockSepPostingsFormat.cs" />
     <Compile Include="Codecs\MockSep\MockSingleIntFactory.cs" />
     <Compile Include="Codecs\MockSep\MockSingleIntIndexInput.cs" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1656b9/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
index 1133c64..1cd9e4b 100644
--- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.intblock
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.IntBlock
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,25 +21,20 @@
 	 * limitations under the License.
 	 */
 
-	using MockFixedIntBlockPostingsFormat = org.apache.lucene.codecs.mockintblock.MockFixedIntBlockPostingsFormat;
-	using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Basic tests for FixedIntBlock
-	/// </summary>
-	public class TestFixedIntBlockPostingsFormat : BasePostingsFormatTestCase
-	{
-	  // TODO: randomize blocksize
-	  private readonly Codec codec = TestUtil.alwaysPostingsFormat(new MockFixedIntBlockPostingsFormat());
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Basic tests for FixedIntBlock
+    /// </summary>
+    public class TestFixedIntBlockPostingsFormat : BasePostingsFormatTestCase
+    {
+        // TODO: randomize blocksize
+        private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new MockFixedIntBlockPostingsFormat());
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1656b9/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
index 1e973dc..f84ac9a 100644
--- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
@@ -1,7 +1,11 @@
-\ufeffnamespace org.apache.lucene.codecs.intblock
-{
+\ufeffusing Lucene.Net.Codecs.Sep;
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.IntBlock
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,59 +22,51 @@
 	 * limitations under the License.
 	 */
 
-	using LuceneTestCase = org.apache.lucene.util.LuceneTestCase;
-	using org.apache.lucene.store;
-	using org.apache.lucene.codecs.mockintblock;
-	using org.apache.lucene.codecs.sep;
-
-	public class TestIntBlockCodec : LuceneTestCase
-	{
-
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public void testSimpleIntBlocks() throws Exception
-	  public virtual void testSimpleIntBlocks()
-	  {
-		Directory dir = newDirectory();
+    public class TestIntBlockCodec : LuceneTestCase
+    {
 
-		IntStreamFactory f = (new MockFixedIntBlockPostingsFormat(128)).IntFactory;
+        [Test]
+        public virtual void TestSimpleIntBlocks()
+        {
+            Directory dir = NewDirectory();
 
-		IntIndexOutput @out = f.createOutput(dir, "test", newIOContext(random()));
-		for (int i = 0;i < 11777;i++)
-		{
-		  @out.write(i);
-		}
-		@out.close();
+            IntStreamFactory f = (new MockFixedIntBlockPostingsFormat(128)).getIntFactory();
 
-		IntIndexInput @in = f.openInput(dir, "test", newIOContext(random()));
-		IntIndexInput.Reader r = @in.reader();
+            IntIndexOutput @out = f.CreateOutput(dir, "test", NewIOContext(Random()));
+            for (int i = 0; i < 11777; i++)
+            {
+                @out.Write(i);
+            }
+            @out.Dispose();
 
-		for (int i = 0;i < 11777;i++)
-		{
-		  assertEquals(i, r.next());
-		}
-		@in.close();
+            IntIndexInput @in = f.OpenInput(dir, "test", NewIOContext(Random()));
+            IntIndexInputReader r = @in.Reader();
 
-		dir.close();
-	  }
+            for (int i = 0; i < 11777; i++)
+            {
+                assertEquals(i, r.Next());
+            }
+            @in.Dispose();
 
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public void testEmptySimpleIntBlocks() throws Exception
-	  public virtual void testEmptySimpleIntBlocks()
-	  {
-		Directory dir = newDirectory();
+            dir.Dispose();
+        }
 
-		IntStreamFactory f = (new MockFixedIntBlockPostingsFormat(128)).IntFactory;
-		IntIndexOutput @out = f.createOutput(dir, "test", newIOContext(random()));
+        [Test]
+        public virtual void TestEmptySimpleIntBlocks()
+        {
+            Directory dir = NewDirectory();
 
-		// write no ints
-		@out.close();
+            IntStreamFactory f = (new MockFixedIntBlockPostingsFormat(128)).getIntFactory();
+            IntIndexOutput @out = f.CreateOutput(dir, "test", NewIOContext(Random()));
 
-		IntIndexInput @in = f.openInput(dir, "test", newIOContext(random()));
-		@in.reader();
-		// read no ints
-		@in.close();
-		dir.close();
-	  }
-	}
+            // write no ints
+            @out.Dispose();
 
+            IntIndexInput @in = f.OpenInput(dir, "test", NewIOContext(Random()));
+            @in.Reader();
+            // read no ints
+            @in.Dispose();
+            dir.Dispose();
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1656b9/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
index 0a8a644..0b74a74 100644
--- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.intblock
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.IntBlock
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,26 +21,25 @@
 	 * limitations under the License.
 	 */
 
-	using MockVariableIntBlockPostingsFormat = org.apache.lucene.codecs.mockintblock.MockVariableIntBlockPostingsFormat;
-	using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Basic tests for VariableIntBlock
-	/// </summary>
-	public class TestVariableIntBlockPostingsFormat : BasePostingsFormatTestCase
-	{
-	  // TODO: randomize blocksize
-	  private readonly Codec codec = TestUtil.alwaysPostingsFormat(new MockVariableIntBlockPostingsFormat());
+    //using MockVariableIntBlockPostingsFormat = org.apache.lucene.codecs.mockintblock.MockVariableIntBlockPostingsFormat;
+    //using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
+    //using TestUtil = org.apache.lucene.util.TestUtil;
+    //using TestUtil = org.apache.lucene.util.TestUtil;
 
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Basic tests for VariableIntBlock
+    /// </summary>
+    public class TestVariableIntBlockPostingsFormat : BasePostingsFormatTestCase
+    {
+        // TODO: randomize blocksize
+        private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new MockVariableIntBlockPostingsFormat());
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1656b9/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
index 7002ab5..db67f15 100644
--- a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
+++ b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
@@ -45,6 +45,9 @@
     <Compile Include="BlockTerms\TestFixedGapPostingsFormat.cs" />
     <Compile Include="Bloom\TestBloomPostingsFormat.cs" />
     <Compile Include="DiskDv\TestDiskDocValuesFormat.cs" />
+    <Compile Include="IntBlock\TestFixedIntBlockPostingsFormat.cs" />
+    <Compile Include="IntBlock\TestIntBlockCodec.cs" />
+    <Compile Include="IntBlock\TestVariableIntBlockPostingsFormat.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Sep\TestSepPostingsFormat.cs" />
     <Compile Include="SimpleText\TestSimpleTextDocValuesFormat.cs" />


[47/47] lucenenet git commit: Merge branch 'codecs-bugz'

Posted by ni...@apache.org.
Merge branch 'codecs-bugz'


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/686b7511
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/686b7511
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/686b7511

Branch: refs/heads/master
Commit: 686b75113be7c4bae2daee20afb5f7a70d79a1d5
Parents: a57e720 7d1915a
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Wed Oct 12 01:15:23 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Oct 12 01:15:23 2016 +0700

----------------------------------------------------------------------
 .../BlockTerms/BlockTermsReader.cs              |   2 +-
 .../DiskDV/DiskDocValuesFormat.cs               |  20 +-
 .../Intblock/FixedIntBlockIndexInput.cs         | 189 +++++-
 .../Intblock/FixedIntBlockIndexOutput.cs        | 131 ++--
 src/Lucene.Net.Codecs/Intblock/IBlockReader.cs  |  31 -
 .../Intblock/IntBlockIndexInput.cs              |  84 ---
 .../Intblock/IntBlockIndexOutput.cs             |  85 ---
 .../Intblock/IntBlockIndexReader.cs             | 100 ----
 .../Intblock/VariableIntBlockIndexInput.cs      | 213 ++++++-
 .../Intblock/VariableIntBlockIndexOutput.cs     | 132 ++--
 src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj  |  12 +-
 .../Memory/DirectDocValuesConsumer.cs           |  47 +-
 .../Memory/DirectDocValuesProducer.cs           |  27 +-
 .../Memory/DirectPostingsFormat.cs              |   4 +-
 .../Memory/FSTOrdTermsReader.cs                 |   7 +-
 src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs  |   6 +-
 .../Memory/MemoryDocValuesConsumer.cs           |  19 +-
 .../Memory/MemoryDocValuesProducer.cs           |  30 +-
 .../Pulsing/PulsingPostingsReader.cs            |   8 +-
 src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs  |   2 +-
 src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs  |   2 +-
 .../SimpleText/SimpleTextDocValuesReader.cs     |  77 +--
 .../SimpleText/SimpleTextDocValuesWriter.cs     |  62 +-
 .../SimpleText/SimpleTextFieldInfosReader.cs    |   3 +-
 .../SimpleText/SimpleTextFieldInfosWriter.cs    |  19 +-
 .../SimpleText/SimpleTextFieldsReader.cs        |  32 +-
 .../SimpleText/SimpleTextFieldsWriter.cs        |  17 +-
 .../SimpleText/SimpleTextLiveDocsFormat.cs      |   5 +-
 .../SimpleText/SimpleTextSegmentInfoReader.cs   |  13 +-
 .../SimpleText/SimpleTextSegmentInfoWriter.cs   |   9 +-
 .../SimpleText/SimpleTextStoredFieldsReader.cs  |  19 +-
 .../SimpleText/SimpleTextStoredFieldsWriter.cs  |  19 +-
 .../SimpleText/SimpleTextTermVectorsReader.cs   |  35 +-
 .../SimpleText/SimpleTextTermVectorsWriter.cs   |  25 +-
 .../SimpleText/SimpleTextUtil.cs                |   8 +-
 src/Lucene.Net.Core/Document/Document.cs        |   2 +-
 src/Lucene.Net.Core/Index/IndexWriter.cs        |  11 +-
 src/Lucene.Net.Core/Index/MergePolicy.cs        |   2 +
 src/Lucene.Net.Core/Index/SegmentInfo.cs        |   2 +-
 .../Index/StandardDirectoryReader.cs            |  14 +-
 .../Store/CompoundFileDirectory.cs              |  15 +-
 src/Lucene.Net.Core/Store/DataInput.cs          |  11 +-
 src/Lucene.Net.Core/Store/FSDirectory.cs        |   4 +
 src/Lucene.Net.Core/Store/IndexInput.cs         |  11 +-
 .../Store/NativeFSLockFactory.cs                |  10 +
 .../Store/TrackingDirectoryWrapper.cs           |   3 +-
 .../Bloom/TestBloomFilteredLucene41Postings.cs  |  68 +++
 .../MockFixedIntBlockPostingsFormat.cs          | 251 ++++++++
 .../MockVariableIntBlockPostingsFormat.cs       | 279 +++++++++
 .../NestedPulsingPostingsFormat.cs              |  97 +++
 .../BaseCompressingDocValuesFormatTestCase.cs   |   3 +
 .../Index/BaseDocValuesFormatTestCase.cs        | 306 +++++-----
 .../Index/BaseIndexFileFormatTestCase.cs        |   2 +-
 .../Index/BasePostingsFormatTestCase.cs         |  14 +-
 .../Index/BaseStoredFieldsFormatTestCase.cs     |  40 +-
 .../Index/BaseTermVectorsFormatTestCase.cs      |  26 +-
 .../Lucene.Net.TestFramework.csproj             |   4 +
 .../Search/AssertingBulkScorer.cs               |   4 +-
 .../Store/MockDirectoryWrapper.cs               |  17 +-
 .../Store/MockIndexInputWrapper.cs              |   6 +-
 .../Util/BaseDocIdSetTestCase.cs                |  18 +-
 .../Util/VirtualMethod.cs                       |   6 +-
 .../BlockTerms/TestFixedGapPostingsFormat.cs    | 110 +++-
 .../Bloom/TestBloomPostingsFormat.cs            | 104 +++-
 .../DiskDv/TestDiskDocValuesFormat.cs           | 597 +++++++++++++++++--
 .../IntBlock/TestFixedIntBlockPostingsFormat.cs | 107 +++-
 .../IntBlock/TestIntBlockCodec.cs               |  92 ++-
 .../TestVariableIntBlockPostingsFormat.cs       | 113 +++-
 .../Lucene.Net.Tests.Codecs.csproj              |  28 +
 .../Memory/TestDirectDocValuesFormat.cs         | 542 ++++++++++++++++-
 .../Memory/TestDirectPostingsFormat.cs          | 107 +++-
 .../Memory/TestFSTOrdPostingsFormat.cs          | 104 +++-
 .../Memory/TestFSTOrdPulsing41PostingsFormat.cs | 104 +++-
 .../Memory/TestFSTPostingsFormat.cs             | 104 +++-
 .../Memory/TestFSTPulsing41PostingsFormat.cs    | 104 +++-
 .../Memory/TestMemoryDocValuesFormat.cs         | 577 +++++++++++++++++-
 .../Memory/TestMemoryPostingsFormat.cs          | 106 +++-
 .../Pulsing/Test10KPulsings.cs                  | 319 +++++-----
 .../Pulsing/TestPulsingPostingsFormat.cs        | 107 +++-
 .../Pulsing/TestPulsingReuse.cs                 | 219 ++++---
 .../Sep/TestSepPostingsFormat.cs                | 107 +++-
 .../SimpleText/TestSimpleTextDocValuesFormat.cs | 543 ++++++++++++++++-
 .../SimpleText/TestSimpleTextPostingsFormat.cs  | 105 +++-
 .../TestSimpleTextStoredFieldsFormat.cs         | 116 +++-
 .../TestSimpleTextTermVectorsFormat.cs          |  92 ++-
 .../Index/Sorter/IndexSortingTest.cs            |  11 +-
 .../Index/Sorter/SorterTestBase.cs              |   8 +
 .../Index/Sorter/SortingAtomicReaderTest.cs     |  11 +-
 .../Compressing/AbstractTestCompressionMode.cs  |  14 +-
 .../AbstractTestLZ4CompressionMode.cs           |   8 +-
 .../TestCompressingStoredFieldsFormat.cs        |  89 +++
 .../TestCompressingTermVectorsFormat.cs         |  67 +++
 .../Compressing/TestFastCompressionMode.cs      |  81 +++
 .../Compressing/TestFastDecompressionMode.cs    |  81 +++
 .../Compressing/TestHighCompressionMode.cs      |  50 ++
 .../Lucene3x/TestLucene3xPostingsFormat.cs      |  63 ++
 .../Lucene3x/TestLucene3xStoredFieldsFormat.cs  |  84 +++
 .../Lucene3x/TestLucene3xTermVectorsFormat.cs   |  67 +++
 .../Lucene40/TestLucene40DocValuesFormat.cs     | 501 ++++++++++++++++
 .../Lucene40/TestLucene40PostingsFormat.cs      |  63 ++
 .../Lucene40/TestLucene40StoredFieldsFormat.cs  |  89 +++
 .../Lucene40/TestLucene40TermVectorsFormat.cs   |  67 +++
 .../Codecs/Lucene41/TestBlockPostingsFormat.cs  |  65 ++
 .../Lucene41/TestLucene41StoredFieldsFormat.cs  |  89 +++
 .../Lucene42/TestLucene42DocValuesFormat.cs     | 526 ++++++++++++++++
 .../Lucene45/TestLucene45DocValuesFormat.cs     | 527 ++++++++++++++++
 .../Perfield/TestPerFieldDocValuesFormat.cs     | 501 ++++++++++++++++
 .../Perfield/TestPerFieldPostingsFormat.cs      |  51 ++
 src/Lucene.Net.Tests/core/Index/Test2BDocs.cs   |  10 +-
 .../core/Index/TestDocValuesFormat.cs           | 503 ++++++++++++++++
 .../core/Index/TestDuelingCodecs.cs             |  10 +-
 .../core/Index/TestIndexWriterMerging.cs        |   2 +-
 .../core/Index/TestIndexWriterWithThreads.cs    |  16 +-
 .../core/Index/TestLogMergePolicy.cs            |  15 +
 .../core/Index/TestMixedDocValuesUpdates.cs     |   2 +-
 .../core/Index/TestNumericDocValuesUpdates.cs   |   2 +-
 .../TestPersistentSnapshotDeletionPolicy.cs     |  50 ++
 .../core/Index/TestPostingsFormat.cs            |  50 ++
 .../core/Index/TestSnapshotDeletionPolicy.cs    |   1 -
 .../core/Index/TestStoredFieldsFormat.cs        |  83 +++
 .../core/Index/TestTermVectorsFormat.cs         |  55 ++
 .../core/Index/TestTieredMergePolicy.cs         |  14 +
 .../core/Search/BaseTestRangeFilter.cs          |   2 +-
 .../Spans/TestSpanExplanationsOfNonMatches.cs   | 214 +++++++
 .../TestComplexExplanationsOfNonMatches.cs      | 160 +++++
 .../core/Search/TestExplanations.cs             |   2 +-
 .../core/Search/TestFieldCacheRangeFilter.cs    |  14 +
 .../core/Search/TestFieldCacheRewriteMethod.cs  |  17 +
 .../core/Search/TestMultiTermConstantScore.cs   |  14 +
 .../core/Search/TestSearchAfter.cs              |   2 +-
 .../TestSimpleExplanationsOfNonMatches.cs       | 452 ++++++++++++++
 .../core/Search/TestTermRangeFilter.cs          |  14 +
 .../core/Util/BaseSortTestCase.cs               |  36 +-
 .../core/Util/Packed/TestEliasFanoDocIdSet.cs   |  45 ++
 .../core/Util/Packed/TestPackedInts.cs          |   2 +-
 .../core/Util/StressRamUsageEstimator.cs        |   3 +-
 .../core/Util/TestDocIdBitSet.cs                |  46 ++
 .../core/Util/TestFixedBitSet.cs                |  45 ++
 .../core/Util/TestInPlaceMergeSorter.cs         |  64 ++
 .../core/Util/TestIntroSorter.cs                |  64 ++
 .../core/Util/TestOpenBitSet.cs                 |  44 ++
 .../core/Util/TestPForDeltaDocIdSet.cs          |  44 ++
 .../core/Util/TestPagedBytes.cs                 |   3 +-
 .../core/Util/TestPriorityQueue.cs              |   5 +-
 src/Lucene.Net.Tests/core/Util/TestTimSorter.cs |  64 ++
 .../core/Util/TestVirtualMethod.cs              |  50 +-
 .../core/Util/TestWAH8DocIdSet.cs               |  44 ++
 147 files changed, 10860 insertions(+), 1743 deletions(-)
----------------------------------------------------------------------



[05/47] lucenenet git commit: Fixed bugs with Codecs.SimpleText.SimpleTextUtil checksum formatting.

Posted by ni...@apache.org.
Fixed bugs with Codecs.SimpleText.SimpleTextUtil checksum formatting.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/12a8118c
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/12a8118c
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/12a8118c

Branch: refs/heads/master
Commit: 12a8118cae6e96b2a0b964cc0ad38b929d1c0524
Parents: 9a1fa37
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Thu Oct 6 23:54:23 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sat Oct 8 17:15:40 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/12a8118c/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
index d9cca8f..ceea7ad 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
@@ -1,4 +1,6 @@
-\ufeff/*
+\ufeffusing System.Globalization;
+
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -90,7 +92,7 @@ namespace Lucene.Net.Codecs.SimpleText
             // Pad with zeros so different checksum values use the
             // same number of bytes
             // (BaseIndexFileFormatTestCase.testMergeStability cares):
-            var checksum = string.Format("{0:D}", output.Checksum);
+            var checksum = string.Format(CultureInfo.InvariantCulture, "{0:D20}", output.Checksum);
             Write(output, CHECKSUM);
             Write(output, checksum, scratch);
             WriteNewline(output);
@@ -99,7 +101,7 @@ namespace Lucene.Net.Codecs.SimpleText
         public static void CheckFooter(ChecksumIndexInput input)
         {
             var scratch = new BytesRef();
-            var expectedChecksum = string.Format("{0:D}", input.Checksum);
+            var expectedChecksum = string.Format(CultureInfo.InvariantCulture, "{0:D20}", input.Checksum);
             ReadLine(input, scratch);
 
             if (StringHelper.StartsWith(scratch, CHECKSUM) == false)


[46/47] lucenenet git commit: Codecs.SimpleText: Fixed several bugs due to string parsing/formatting without invariant culture, missing CompareTo() calls, and missing null checks.

Posted by ni...@apache.org.
Codecs.SimpleText: Fixed several bugs due to string parsing/formatting without invariant culture, missing CompareTo() calls, and missing null checks.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/7d1915a9
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/7d1915a9
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/7d1915a9

Branch: refs/heads/master
Commit: 7d1915a9b6804c954804bb9a013827e271412f47
Parents: fbc171b
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 17:09:36 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Oct 12 01:11:00 2016 +0700

----------------------------------------------------------------------
 .../SimpleText/SimpleTextFieldsReader.cs        | 16 +++++++-------
 .../SimpleText/SimpleTextFieldsWriter.cs        | 17 ++++++++-------
 .../SimpleText/SimpleTextLiveDocsFormat.cs      |  5 +++--
 .../SimpleText/SimpleTextSegmentInfoWriter.cs   |  9 ++++----
 .../SimpleText/SimpleTextStoredFieldsWriter.cs  |  4 ++--
 .../SimpleText/SimpleTextTermVectorsWriter.cs   | 23 ++++++++++----------
 6 files changed, 39 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7d1915a9/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
index 1bc6c17..da964ba 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
@@ -199,7 +199,7 @@ namespace Lucene.Net.Codecs.SimpleText
             public override DocsEnum Docs(Bits liveDocs, DocsEnum reuse, int flags)
             {
                 SimpleTextDocsEnum docsEnum;
-                if (reuse is SimpleTextDocsEnum && ((SimpleTextDocsEnum) reuse).CanReuse(_outerInstance._input))
+                if (reuse != null && reuse is SimpleTextDocsEnum && ((SimpleTextDocsEnum) reuse).CanReuse(_outerInstance._input))
                 {
                     docsEnum = (SimpleTextDocsEnum) reuse;
                 }
@@ -214,14 +214,14 @@ namespace Lucene.Net.Codecs.SimpleText
             public override DocsAndPositionsEnum DocsAndPositions(Bits liveDocs, DocsAndPositionsEnum reuse, int flags)
             {
 
-                if (_indexOptions < IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
+                if (_indexOptions.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) < 0)
                 {
                     // Positions were not indexed
                     return null;
                 }
 
                 SimpleTextDocsAndPositionsEnum docsAndPositionsEnum;
-                if (reuse is SimpleTextDocsAndPositionsEnum && ((SimpleTextDocsAndPositionsEnum) reuse).CanReuse(_outerInstance._input))
+                if (reuse != null && reuse is SimpleTextDocsAndPositionsEnum && ((SimpleTextDocsAndPositionsEnum) reuse).CanReuse(_outerInstance._input))
                 {
                     docsAndPositionsEnum = (SimpleTextDocsAndPositionsEnum) reuse;
                 }
@@ -399,8 +399,8 @@ namespace Lucene.Net.Codecs.SimpleText
                 _liveDocs = liveDocs;
                 _nextDocStart = fp;
                 _docId = -1;
-                _readPositions = indexOptions >= IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
-                _readOffsets = indexOptions >= IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS;
+                _readPositions = indexOptions.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;
+                _readOffsets = indexOptions.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
 
                 if (!_readOffsets)
                 {
@@ -709,18 +709,18 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public override bool HasFreqs()
             {
-                return _fieldInfo.FieldIndexOptions >= IndexOptions.DOCS_AND_FREQS;
+                return _fieldInfo.FieldIndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS) >= 0;
             }
 
             public override bool HasOffsets()
             {
                 return
-                    _fieldInfo.FieldIndexOptions >= IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS;
+                    _fieldInfo.FieldIndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
             }
 
             public override bool HasPositions()
             {
-                return _fieldInfo.FieldIndexOptions >= IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
+                return _fieldInfo.FieldIndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;
             }
 
             public override bool HasPayloads()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7d1915a9/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
index 465d97b..ec54003 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
@@ -16,8 +16,9 @@
  */
 
 using System;
-using System.Diagnostics;
 using System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
@@ -136,8 +137,8 @@ namespace Lucene.Net.Codecs.SimpleText
             {
                 _outerInstance = outerInstance;
                 _indexOptions = field.FieldIndexOptions.Value;
-                _writePositions = _indexOptions >= IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
-                _writeOffsets = _indexOptions >= IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS;
+                _writePositions = _indexOptions.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;
+                _writeOffsets = _indexOptions.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
             }
 
             public override void StartDoc(int docId, int termDocFreq)
@@ -152,12 +153,12 @@ namespace Lucene.Net.Codecs.SimpleText
                 }
 
                 _outerInstance.Write(DOC);
-                _outerInstance.Write(Convert.ToString(docId));
+                _outerInstance.Write(Convert.ToString(docId, CultureInfo.InvariantCulture));
                 _outerInstance.Newline();
                 if (_indexOptions != IndexOptions.DOCS_ONLY)
                 {
                     _outerInstance.Write(FREQ);
-                    _outerInstance.Write(Convert.ToString(termDocFreq));
+                    _outerInstance.Write(Convert.ToString(termDocFreq, CultureInfo.InvariantCulture));
                     _outerInstance.Newline();
                 }
 
@@ -176,7 +177,7 @@ namespace Lucene.Net.Codecs.SimpleText
                 if (_writePositions)
                 {
                     _outerInstance.Write(POS);
-                    _outerInstance.Write(Convert.ToString(position));
+                    _outerInstance.Write(Convert.ToString(position, CultureInfo.InvariantCulture));
                     _outerInstance.Newline();
                 }
 
@@ -187,10 +188,10 @@ namespace Lucene.Net.Codecs.SimpleText
                         "startOffset=" + startOffset + " lastStartOffset=" + _lastStartOffset);
                     _lastStartOffset = startOffset;
                     _outerInstance.Write(START_OFFSET);
-                    _outerInstance.Write(Convert.ToString(startOffset));
+                    _outerInstance.Write(Convert.ToString(startOffset, CultureInfo.InvariantCulture));
                     _outerInstance.Newline();
                     _outerInstance.Write(END_OFFSET);
-                    _outerInstance.Write(Convert.ToString(endOffset));
+                    _outerInstance.Write(Convert.ToString(endOffset, CultureInfo.InvariantCulture));
                     _outerInstance.Newline();
                 }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7d1915a9/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
index 57c50f4..5b7db99 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
@@ -22,6 +22,7 @@ namespace Lucene.Net.Codecs.SimpleText
     using System.Diagnostics;
     using System.Collections;
     using System.Collections.Generic;
+    using System.Globalization;
     using Support;
 
 	using IndexFileNames = Index.IndexFileNames;
@@ -133,13 +134,13 @@ namespace Lucene.Net.Codecs.SimpleText
             {
                 output = dir.CreateOutput(fileName, context);
                 SimpleTextUtil.Write(output, SIZE);
-                SimpleTextUtil.Write(output, Convert.ToString(size), scratch);
+                SimpleTextUtil.Write(output, Convert.ToString(size, CultureInfo.InvariantCulture), scratch);
                 SimpleTextUtil.WriteNewline(output);
 
                 for (int i = set.NextSetBit(0); i >= 0; i = set.NextSetBit(i + 1))
                 {
                     SimpleTextUtil.Write(output, DOC);
-                    SimpleTextUtil.Write(output, Convert.ToString(i), scratch);
+                    SimpleTextUtil.Write(output, Convert.ToString(i, CultureInfo.InvariantCulture), scratch);
                     SimpleTextUtil.WriteNewline(output);
                 }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7d1915a9/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
index 35d0437..0c77fda 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
@@ -19,6 +19,7 @@ namespace Lucene.Net.Codecs.SimpleText
 {
     using System;
     using System.Collections.Generic;
+    using System.Globalization;
 
     using FieldInfos = Index.FieldInfos;
     using IndexFileNames = Index.IndexFileNames;
@@ -65,17 +66,17 @@ namespace Lucene.Net.Codecs.SimpleText
                 SimpleTextUtil.WriteNewline(output);
 
                 SimpleTextUtil.Write(output, SI_DOCCOUNT);
-                SimpleTextUtil.Write(output, Convert.ToString(si.DocCount), scratch);
+                SimpleTextUtil.Write(output, Convert.ToString(si.DocCount, CultureInfo.InvariantCulture), scratch);
                 SimpleTextUtil.WriteNewline(output);
 
                 SimpleTextUtil.Write(output, SI_USECOMPOUND);
-                SimpleTextUtil.Write(output, Convert.ToString(si.UseCompoundFile), scratch);
+                SimpleTextUtil.Write(output, Convert.ToString(si.UseCompoundFile, CultureInfo.InvariantCulture).ToLowerInvariant(), scratch);
                 SimpleTextUtil.WriteNewline(output);
 
                 IDictionary<string, string> diagnostics = si.Diagnostics;
                 int numDiagnostics = diagnostics == null ? 0 : diagnostics.Count;
                 SimpleTextUtil.Write(output, SI_NUM_DIAG);
-                SimpleTextUtil.Write(output, Convert.ToString(numDiagnostics), scratch);
+                SimpleTextUtil.Write(output, Convert.ToString(numDiagnostics, CultureInfo.InvariantCulture), scratch);
                 SimpleTextUtil.WriteNewline(output);
 
                 if (numDiagnostics > 0)
@@ -95,7 +96,7 @@ namespace Lucene.Net.Codecs.SimpleText
                 var files = si.Files;
                 var numFiles = files == null ? 0 : files.Count;
                 SimpleTextUtil.Write(output, SI_NUM_FILES);
-                SimpleTextUtil.Write(output, Convert.ToString(numFiles), scratch);
+                SimpleTextUtil.Write(output, Convert.ToString(numFiles, CultureInfo.InvariantCulture), scratch);
                 SimpleTextUtil.WriteNewline(output);
 
                 if (numFiles > 0)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7d1915a9/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
index ebfc9b5..369ab1b 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
@@ -86,11 +86,11 @@ namespace Lucene.Net.Codecs.SimpleText
         public override void StartDocument(int numStoredFields)
 	    {
 	        Write(DOC);
-	        Write(Convert.ToString(_numDocsWritten));
+	        Write(Convert.ToString(_numDocsWritten, CultureInfo.InvariantCulture));
 	        NewLine();
 
 	        Write(NUM);
-	        Write(Convert.ToString(numStoredFields));
+	        Write(Convert.ToString(numStoredFields, CultureInfo.InvariantCulture));
 	        NewLine();
 
 	        _numDocsWritten++;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7d1915a9/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
index 3425006..c52eb1e 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
@@ -21,6 +21,7 @@ namespace Lucene.Net.Codecs.SimpleText
     using System;
     using System.Diagnostics;
     using System.Collections.Generic;
+    using System.Globalization;
     using FieldInfo = Index.FieldInfo;
     using FieldInfos = Index.FieldInfos;
     using IndexFileNames = Index.IndexFileNames;
@@ -89,11 +90,11 @@ namespace Lucene.Net.Codecs.SimpleText
         public override void StartDocument(int numVectorFields)
         {
             Write(DOC);
-            Write(Convert.ToString(_numDocsWritten));
+            Write(Convert.ToString(_numDocsWritten, CultureInfo.InvariantCulture));
             NewLine();
 
             Write(NUMFIELDS);
-            Write(Convert.ToString(numVectorFields));
+            Write(Convert.ToString(numVectorFields, CultureInfo.InvariantCulture));
             NewLine();
             _numDocsWritten++;
         }
@@ -101,7 +102,7 @@ namespace Lucene.Net.Codecs.SimpleText
         public override void StartField(FieldInfo info, int numTerms, bool positions, bool offsets, bool payloads)
         {
             Write(FIELD);
-            Write(Convert.ToString(info.Number));
+            Write(Convert.ToString(info.Number, CultureInfo.InvariantCulture));
             NewLine();
 
             Write(FIELDNAME);
@@ -109,19 +110,19 @@ namespace Lucene.Net.Codecs.SimpleText
             NewLine();
 
             Write(FIELDPOSITIONS);
-            Write(Convert.ToString(positions));
+            Write(Convert.ToString(positions, CultureInfo.InvariantCulture).ToLowerInvariant());
             NewLine();
 
             Write(FIELDOFFSETS);
-            Write(Convert.ToString(offsets));
+            Write(Convert.ToString(offsets, CultureInfo.InvariantCulture).ToLowerInvariant());
             NewLine();
 
             Write(FIELDPAYLOADS);
-            Write(Convert.ToString(payloads));
+            Write(Convert.ToString(payloads, CultureInfo.InvariantCulture).ToLowerInvariant());
             NewLine();
 
             Write(FIELDTERMCOUNT);
-            Write(Convert.ToString(numTerms));
+            Write(Convert.ToString(numTerms, CultureInfo.InvariantCulture));
             NewLine();
 
             _positions = positions;
@@ -136,7 +137,7 @@ namespace Lucene.Net.Codecs.SimpleText
             NewLine();
 
             Write(TERMFREQ);
-            Write(Convert.ToString(freq));
+            Write(Convert.ToString(freq, CultureInfo.InvariantCulture));
             NewLine();
         }
 
@@ -147,7 +148,7 @@ namespace Lucene.Net.Codecs.SimpleText
             if (_positions)
             {
                 Write(POSITION);
-                Write(Convert.ToString(position));
+                Write(Convert.ToString(position, CultureInfo.InvariantCulture));
                 NewLine();
 
                 if (_payloads)
@@ -165,11 +166,11 @@ namespace Lucene.Net.Codecs.SimpleText
             if (_offsets)
             {
                 Write(STARTOFFSET);
-                Write(Convert.ToString(startOffset));
+                Write(Convert.ToString(startOffset, CultureInfo.InvariantCulture));
                 NewLine();
 
                 Write(ENDOFFSET);
-                Write(Convert.ToString(endOffset));
+                Write(Convert.ToString(endOffset, CultureInfo.InvariantCulture));
                 NewLine();
             }
         }


[29/47] lucenenet git commit: Fixed several bugs in Codecs.Memory that were causing tests not to pass.

Posted by ni...@apache.org.
Fixed several bugs in Codecs.Memory that were causing tests not to pass.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/c574b757
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/c574b757
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/c574b757

Branch: refs/heads/master
Commit: c574b757e1d449b14e59414a410adccd6fdff959
Parents: d7dca52
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 10 15:12:53 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:25 2016 +0700

----------------------------------------------------------------------
 .../Memory/DirectDocValuesConsumer.cs           | 45 +++++++++++---------
 .../Memory/DirectDocValuesProducer.cs           | 27 ++++++------
 .../Memory/DirectPostingsFormat.cs              |  4 +-
 .../Memory/FSTOrdTermsReader.cs                 |  7 ++-
 src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs  |  6 ++-
 .../Memory/MemoryDocValuesConsumer.cs           | 17 ++++++--
 .../Memory/MemoryDocValuesProducer.cs           | 30 ++++++-------
 7 files changed, 78 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c574b757/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs b/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
index 4fb2a00..45fccde 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
@@ -48,11 +48,11 @@ namespace Lucene.Net.Codecs.Memory
                 string dataName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix,
                     dataExtension);
                 data = state.Directory.CreateOutput(dataName, state.Context);
-                CodecUtil.WriteHeader(data, dataCodec, MemoryDocValuesProducer.VERSION_CURRENT);
+                CodecUtil.WriteHeader(data, dataCodec, DirectDocValuesProducer.VERSION_CURRENT);
                 string metaName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix,
                     metaExtension);
                 meta = state.Directory.CreateOutput(metaName, state.Context);
-                CodecUtil.WriteHeader(meta, metaCodec, MemoryDocValuesProducer.VERSION_CURRENT);
+                CodecUtil.WriteHeader(meta, metaCodec, DirectDocValuesProducer.VERSION_CURRENT);
                 success = true;
             }
             finally
@@ -136,7 +136,7 @@ namespace Lucene.Net.Codecs.Memory
                 long v;
                 if (nv != null)
                 {
-                    v = (long) nv;
+                    v = nv.Value;
                 }
                 else
                 {
@@ -329,8 +329,7 @@ namespace Lucene.Net.Codecs.Memory
             // (the final sum):
             public virtual IEnumerator<long?> GetEnumerator()
             {
-                var iter = _docToOrdCount.GetEnumerator();
-                return new IteratorAnonymousInnerClassHelper(this, iter);
+                return new IteratorAnonymousInnerClassHelper(this, _docToOrdCount);
             }
 
             IEnumerator IEnumerable.GetEnumerator()
@@ -340,23 +339,24 @@ namespace Lucene.Net.Codecs.Memory
 
             private class IteratorAnonymousInnerClassHelper : IEnumerator<long?>
             {
-                private readonly IEnumerator<long?> _iter;
+                private readonly IEnumerator<long?> iter;
 
                 public IteratorAnonymousInnerClassHelper(IterableAnonymousInnerClassHelper outerInstance,
-                    IEnumerator<long?> iter)
+                    IEnumerable<long?> docToOrdCount)
                 {
-                    _iter = iter;
+                    this.iter = docToOrdCount.GetEnumerator();
                 }
 
 
                 private long sum;
                 private bool ended;
+                private long toReturn;
 
                 public long? Current
                 {
                     get
                     {
-                        return _iter.Current;
+                        return toReturn;
                     }
                 }
 
@@ -368,17 +368,16 @@ namespace Lucene.Net.Codecs.Memory
                     }
                 }
 
-                public virtual void Remove()
-                {
-                    throw new NotSupportedException();
-                }
+                // LUCENENET: Remove() not supported by .NET
 
                 public bool MoveNext()
                 {
-                    long toReturn = sum;
-                    if (_iter.MoveNext())
+                    if (ended) return false;
+
+                    toReturn = sum;
+                    if (iter.MoveNext())
                     {
-                        long? n = _iter.Current;
+                        long? n = iter.Current;
                         if (n.HasValue)
                         {
                             sum += n.Value;
@@ -386,18 +385,21 @@ namespace Lucene.Net.Codecs.Memory
 
                         return true;
                     }
-                    else 
+                    else if (!ended)
                     {
                         ended = true;
+                        return true;
+                    }
+                    else
+                    { 
+                        Debug.Assert(false);
                         return false;
                     }
-
-                    //return toReturn;
                 }
 
                 public void Reset()
                 {
-                    throw new NotImplementedException();
+                    throw new NotSupportedException();
                 }
 
                 #region IDisposable Support
@@ -409,7 +411,8 @@ namespace Lucene.Net.Codecs.Memory
                     {
                         if (disposing)
                         {
-                            // TODO: dispose managed state (managed objects).          
+                            // TODO: dispose managed state (managed objects).
+                            iter.Dispose();         
                         }
 
                         // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c574b757/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs b/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
index 19d71d2..f98933e 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
@@ -4,6 +4,7 @@ using Lucene.Net.Index;
 using Lucene.Net.Store;
 using Lucene.Net.Support;
 using Lucene.Net.Util;
+using System;
 
 namespace Lucene.Net.Codecs.Memory
 {
@@ -214,8 +215,8 @@ namespace Lucene.Net.Codecs.Memory
         {
             lock (this)
             {
-                var instance = numericInstances[field.Number];
-                if (instance == null)
+                NumericDocValues instance;
+                if (!numericInstances.TryGetValue(field.Number, out instance))
                 {
                     // Lazy load
                     instance = LoadNumeric(numerics[field.Number]);
@@ -235,7 +236,8 @@ namespace Lucene.Net.Codecs.Memory
                         var values = new byte[entry.count];
                         data.ReadBytes(values, 0, entry.count);
                         ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(values));
-                        return new NumericDocValuesAnonymousInnerClassHelper(values);
+                        // LUCENENET: IMPORTANT - some bytes are negative here, so we need to pass as sbyte
+                        return new NumericDocValuesAnonymousInnerClassHelper((sbyte[])(Array)values);
                     }
 
                 case 2:
@@ -278,9 +280,9 @@ namespace Lucene.Net.Codecs.Memory
 
         private class NumericDocValuesAnonymousInnerClassHelper : NumericDocValues
         {
-            private readonly byte[] values;
+            private readonly sbyte[] values;
 
-            public NumericDocValuesAnonymousInnerClassHelper(byte[] values)
+            public NumericDocValuesAnonymousInnerClassHelper(sbyte[] values)
             {
                 this.values = values;
             }
@@ -340,8 +342,8 @@ namespace Lucene.Net.Codecs.Memory
         {
             lock (this)
             {
-                var instance = binaryInstances[field.Number];
-                if (instance == null)
+                BinaryDocValues instance;
+                if (!binaryInstances.TryGetValue(field.Number, out instance))
                 {
                     // Lazy load
                     instance = LoadBinary(binaries[field.Number]);
@@ -393,8 +395,8 @@ namespace Lucene.Net.Codecs.Memory
         {
             lock (this)
             {
-                var instance = sortedInstances[field.Number];
-                if (instance == null)
+                SortedDocValues instance;
+                if (!sortedInstances.TryGetValue(field.Number, out instance))
                 {
                     // Lazy load
                     instance = LoadSorted(field);
@@ -457,9 +459,9 @@ namespace Lucene.Net.Codecs.Memory
         {
             lock (this)
             {
-                var instance = sortedSetInstances[field.Number];
                 var entry = sortedSets[field.Number];
-                if (instance == null)
+                SortedSetRawValues instance;
+                if (!sortedSetInstances.TryGetValue(field.Number, out instance))
                 {
                     // Lazy load
                     instance = LoadSortedSet(entry);
@@ -563,8 +565,7 @@ namespace Lucene.Net.Codecs.Memory
                 Bits instance;
                 lock (this)
                 {
-                    instance = docsWithFieldInstances[fieldNumber];
-                    if (instance == null)
+                    if (!docsWithFieldInstances.TryGetValue(fieldNumber, out instance))
                     {
                         var data = (IndexInput)this.data.Clone();
                         data.Seek(offset);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c574b757/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
index 378399d..de8a586 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
@@ -334,7 +334,7 @@ namespace Lucene.Net.Codecs.Memory
                 terms = new TermAndSkip[numTerms];
                 termOffsets = new int[1 + numTerms];
 
-                sbyte[] termBytes = new sbyte[1024];
+                byte[] termBytes = new byte[1024];
 
                 this.minSkipCount = minSkipCount;
 
@@ -622,7 +622,7 @@ namespace Lucene.Net.Codecs.Memory
                 return termLen - other.Length;
             }
 
-            private void SetSkips(int termOrd, sbyte[] termBytes)
+            private void SetSkips(int termOrd, byte[] termBytes)
             {
                 int termLength = termOffsets[termOrd + 1] - termOffsets[termOrd];
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c574b757/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
index 86afc3e..2850c3a 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
@@ -84,8 +84,11 @@ namespace Lucene.Net.Codecs.Memory
                     var index = new FST<long?>(indexIn, PositiveIntOutputs.Singleton);
 
                     var current = new TermsReader(this, fieldInfo, blockIn, numTerms, sumTotalTermFreq, sumDocFreq, docCount, longsSize, index);
-            
-                    var previous = fields[fieldInfo.Name] = current;
+                    TermsReader previous;
+                    // LUCENENET NOTE: This simulates a put operation in Java,
+                    // getting the prior value first before setting it.
+                    fields.TryGetValue(fieldInfo.Name, out previous);
+                    fields[fieldInfo.Name] = current;
                     CheckFieldSummary(state.SegmentInfo, indexIn, blockIn, current, previous);
                 }
                 if (version >= FSTOrdTermsWriter.TERMS_VERSION_CHECKSUM)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c574b757/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs b/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
index 0077054..93d63c7 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
@@ -93,7 +93,11 @@ namespace Lucene.Net.Codecs.Memory
                     int docCount = @in.ReadVInt();
                     int longsSize = @in.ReadVInt();
                     TermsReader current = new TermsReader(this, fieldInfo, @in, numTerms, sumTotalTermFreq, sumDocFreq, docCount, longsSize);
-                    TermsReader previous = fields[fieldInfo.Name] = current;
+                    TermsReader previous;
+                    // LUCENENET NOTE: This simulates a put operation in Java,
+                    // getting the prior value first before setting it.
+                    fields.TryGetValue(fieldInfo.Name, out previous);
+                    fields[fieldInfo.Name] = current;
                     CheckFieldSummary(state.SegmentInfo, @in, current, previous);
                 }
                 success = true;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c574b757/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
index 18936e8..1c6a748 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
@@ -102,7 +102,16 @@ namespace Lucene.Net.Codecs.Memory
                 long count = 0;
                 foreach (var nv in values)
                 {
-                    long v = nv.Value;
+                    long v;
+                    if (nv == null)
+                    {
+                        v = 0;
+                        missing = true;
+                    }
+                    else
+                    {
+                        v = nv.Value;
+                    }
 
                     if (gcd != 1)
                     {
@@ -218,7 +227,7 @@ namespace Lucene.Net.Codecs.Memory
                 var writer = new BlockPackedWriter(data, MemoryDocValuesProducer.BLOCK_SIZE);
                 foreach (var nv in values)
                 {
-                    writer.Add(nv.Value);
+                    writer.Add(nv.GetValueOrDefault());
                 }
                 writer.Finish();
             }
@@ -494,12 +503,12 @@ namespace Lucene.Net.Codecs.Memory
 
             public void Dispose()
             {
-                throw new NotImplementedException();
+                // nothing to do
             }
 
             public void Reset()
             {
-                throw new NotImplementedException();
+                throw new NotSupportedException();
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c574b757/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
index ec82d39..2703f5e 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
@@ -208,8 +208,8 @@ namespace Lucene.Net.Codecs.Memory
         {
             lock (this)
             {
-                NumericDocValues instance = numericInstances[field.Number];
-                if (instance == null)
+                NumericDocValues instance;
+                if (!numericInstances.TryGetValue(field.Number, out instance))
                 {
                     instance = LoadNumeric(field);
                     numericInstances[field.Number] = instance;
@@ -265,7 +265,8 @@ namespace Lucene.Net.Codecs.Memory
                     var bytes = new byte[maxDoc];
                     data.ReadBytes(bytes, 0, bytes.Length);
                     ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(bytes));
-                    return new NumericDocValuesAnonymousInnerClassHelper2(this, bytes);
+                    // LUCENENET: IMPORTANT - some bytes are negative here, so we need to pass as sbyte
+                    return new NumericDocValuesAnonymousInnerClassHelper2(this, (sbyte[])(Array)bytes);
                 case GCD_COMPRESSED:
                     long min = data.ReadLong();
                     long mult = data.ReadLong();
@@ -303,9 +304,9 @@ namespace Lucene.Net.Codecs.Memory
         private class NumericDocValuesAnonymousInnerClassHelper2 : NumericDocValues
         {
             private readonly MemoryDocValuesProducer outerInstance;
-            private readonly byte[] bytes;
+            private readonly sbyte[] bytes;
 
-            public NumericDocValuesAnonymousInnerClassHelper2(MemoryDocValuesProducer outerInstance, byte[] bytes)
+            public NumericDocValuesAnonymousInnerClassHelper2(MemoryDocValuesProducer outerInstance, sbyte[] bytes)
             {
                 this.outerInstance = outerInstance;
                 this.bytes = bytes;
@@ -341,8 +342,8 @@ namespace Lucene.Net.Codecs.Memory
         {
             lock (this)
             {
-                BinaryDocValues instance = binaryInstances[field.Number];
-                if (instance == null)
+                BinaryDocValues instance;
+                if (!binaryInstances.TryGetValue(field.Number, out instance))
                 {
                     instance = LoadBinary(field);
                     binaryInstances[field.Number] = instance;
@@ -425,8 +426,7 @@ namespace Lucene.Net.Codecs.Memory
             FST<long?> instance;
             lock (this)
             {
-                instance = fstInstances[field.Number];
-                if (instance == null)
+                if (!fstInstances.TryGetValue(field.Number, out instance))
                 {
                     data.Seek(entry.offset);
                     instance = new FST<long?>(data, PositiveIntOutputs.Singleton);
@@ -541,8 +541,7 @@ namespace Lucene.Net.Codecs.Memory
             FST<long?> instance;
             lock (this)
             {
-                instance = fstInstances[field.Number];
-                if (instance == null)
+                if (!fstInstances.TryGetValue(field.Number, out instance))
                 {
                     data.Seek(entry.offset);
                     instance = new FST<long?>(data, PositiveIntOutputs.Singleton);
@@ -683,8 +682,7 @@ namespace Lucene.Net.Codecs.Memory
                 Bits instance;
                 lock (this)
                 {
-                    instance = docsWithFieldInstances[fieldNumber];
-                    if (instance == null)
+                    if (!docsWithFieldInstances.TryGetValue(fieldNumber, out instance))
                     {
                         var data = (IndexInput)this.data.Clone();
                         data.Seek(offset);
@@ -723,8 +721,10 @@ namespace Lucene.Net.Codecs.Memory
 
         protected override void Dispose(bool disposing)
         {
-            data.Dispose();
-            base.Dispose();
+            if (disposing)
+            {
+                data.Dispose();
+            }
         }
 
         internal class NumericEntry


[08/47] lucenenet git commit: Fixed Regex bug in Core.Index.TestDuelingCodecs

Posted by ni...@apache.org.
Fixed Regex bug in Core.Index.TestDuelingCodecs


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/2fa691b9
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/2fa691b9
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/2fa691b9

Branch: refs/heads/master
Commit: 2fa691b9e3ba1c0b7db3baf1dd82f13060a5e1c7
Parents: 12a8118
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Oct 8 12:55:37 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sat Oct 8 17:15:41 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2fa691b9/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs b/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs
index 624708a..06c3dbb 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs
@@ -4,6 +4,7 @@ using System;
 
 namespace Lucene.Net.Index
 {
+    using System.Text.RegularExpressions;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using Codec = Lucene.Net.Codecs.Codec;
     using Directory = Lucene.Net.Store.Directory;
@@ -138,6 +139,9 @@ namespace Lucene.Net.Index
             // primary source for our data is from linefiledocs, its realistic.
             LineFileDocs lineFileDocs = new LineFileDocs(random);
 
+            // LUCENENET: compile a regex so we don't have to do it in each loop (for regex.split())
+            Regex whiteSpace = new Regex("\\s+", RegexOptions.Compiled);
+
             // TODO: we should add other fields that use things like docs&freqs but omit positions,
             // because linefiledocs doesn't cover all the possibilities.
             for (int i = 0; i < numdocs; i++)
@@ -145,7 +149,7 @@ namespace Lucene.Net.Index
                 Document document = lineFileDocs.NextDoc();
                 // grab the title and add some SortedSet instances for fun
                 string title = document.Get("titleTokenized");
-                string[] split = title.Split("\\s+".ToCharArray());
+                string[] split = whiteSpace.Split(title);
                 foreach (string trash in split)
                 {
                     document.Add(new SortedSetDocValuesField("sortedset", new BytesRef(trash)));


[31/47] lucenenet git commit: Fixed bug in Index.Test2BDocs that was causing the temp directory to be deleted before both tests were finished using it (which only failed when both tests were run at the same time).

Posted by ni...@apache.org.
Fixed bug in Index.Test2BDocs that was causing the temp directory to be deleted before both tests were finished using it (which only failed when both tests were run at the same time).


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/e77e6a11
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/e77e6a11
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/e77e6a11

Branch: refs/heads/master
Commit: e77e6a11ccd2276c4a18f9d7bfb14922faceb848
Parents: 6d50af1
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 10 18:24:37 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:26 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Index/Test2BDocs.cs | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e77e6a11/src/Lucene.Net.Tests/core/Index/Test2BDocs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/Test2BDocs.cs b/src/Lucene.Net.Tests/core/Index/Test2BDocs.cs
index 8f9ed67..7bf3749 100644
--- a/src/Lucene.Net.Tests/core/Index/Test2BDocs.cs
+++ b/src/Lucene.Net.Tests/core/Index/Test2BDocs.cs
@@ -44,10 +44,18 @@ namespace Lucene.Net.Index
         }
 
         [TestFixtureTearDown]
-        public static void AfterClass()
+        public void AfterClass()
         {
             Dir.Dispose();
             Dir = null;
+            base.TearDown();
+        }
+
+        public override void TearDown()
+        {
+            // LUCENENET: We don't want our temp directory deleted until after
+            // all of the tests in the class run. So we need to override this and
+            // call base.TearDown() manually during TestFixtureTearDown
         }
 
         [Test]


[37/47] lucenenet git commit: Reverted test method stubs on Misc.Index.Sorter.SorterTestBase-derived test classes so this state can be returned to later when swapping test frameworks to xUnit.

Posted by ni...@apache.org.
Reverted test method stubs on Misc.Index.Sorter.SorterTestBase-derived test classes so this state can be returned to later when swapping test frameworks to xUnit.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/b4bbbeff
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/b4bbbeff
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/b4bbbeff

Branch: refs/heads/master
Commit: b4bbbeffe61f04a83c89ea3ba8b242b42efa7767
Parents: 70ae196
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 03:31:46 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Oct 12 01:10:56 2016 +0700

----------------------------------------------------------------------
 .../Index/Sorter/IndexSortingTest.cs            | 55 --------------------
 .../Index/Sorter/SorterTestBase.cs              |  8 +++
 .../Index/Sorter/SortingAtomicReaderTest.cs     | 55 --------------------
 3 files changed, 8 insertions(+), 110 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b4bbbeff/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
index fcd1e1e..164f275 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
@@ -87,60 +87,5 @@ namespace Lucene.Net.Index.Sorter
             reader = SlowCompositeReaderWrapper.Wrap(DirectoryReader.Open(dir));
             assertFalse("index should not have deletions", reader.HasDeletions);
         }
-
-
-        // LUCENENET NOTE: According to this answer, you are supposed to be able to
-        // put tests in an abstract class to run them from multiple places with different
-        // test input. However, that doesn't seem to work in Visual Studio - it doesn't
-        // find any test in an abstract class. So, this is a (not so great) workaround
-        // to run the tests from multiple places without having to duplicate the test code.
-
-        [Test]
-        public override void TestBinaryDocValuesField()
-        {
-            base.TestBinaryDocValuesField();
-        }
-
-        [Test]
-        public override void TestDocsAndPositionsEnum()
-        {
-            base.TestDocsAndPositionsEnum();
-        }
-
-        [Test]
-        public override void TestDocsEnum()
-        {
-            base.TestDocsEnum();
-        }
-
-        [Test]
-        public override void TestNormValues()
-        {
-            base.TestNormValues();
-        }
-
-        [Test]
-        public override void TestNumericDocValuesField()
-        {
-            base.TestNumericDocValuesField();
-        }
-
-        [Test]
-        public override void TestSortedDocValuesField()
-        {
-            base.TestSortedDocValuesField();
-        }
-
-        [Test]
-        public override void TestSortedSetDocValuesField()
-        {
-            base.TestSortedSetDocValuesField();
-        }
-
-        [Test]
-        public override void TestTermVectors()
-        {
-            base.TestTermVectors();
-        }
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b4bbbeff/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
index ba760e6..2cff135 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
@@ -230,6 +230,7 @@ namespace Lucene.Net.Index.Sorter
             dir.Dispose();
         }
 
+        [Test]
         public virtual void TestBinaryDocValuesField()
         {
             BinaryDocValues dv = reader.GetBinaryDocValues(BINARY_DV_FIELD);
@@ -241,6 +242,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
+        [Test]
         public virtual void TestDocsAndPositionsEnum()
         {
             TermsEnum termsEnum = reader.Terms(DOC_POSITIONS_FIELD).Iterator(null);
@@ -320,6 +322,7 @@ namespace Lucene.Net.Index.Sorter
             return bits;
         }
 
+        [Test]
         public virtual void TestDocsEnum()
         {
             Bits mappedLiveDocs = RandomLiveDocs(reader.MaxDoc);
@@ -366,6 +369,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
+        [Test]
         public virtual void TestNormValues()
         {
             NumericDocValues dv = reader.GetNormValues(NORMS_FIELD);
@@ -376,6 +380,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
+        [Test]
         public virtual void TestNumericDocValuesField()
         {
             NumericDocValues dv = reader.GetNumericDocValues(NUMERIC_DV_FIELD);
@@ -386,6 +391,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
+        [Test]
         public virtual void TestSortedDocValuesField()
         {
             SortedDocValues dv = reader.GetSortedDocValues(SORTED_DV_FIELD);
@@ -398,6 +404,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
+        [Test]
         public virtual void TestSortedSetDocValuesField()
         {
             AssumeTrue("default codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -416,6 +423,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
+        [Test]
         public virtual void TestTermVectors()
         {
             int maxDoc = reader.MaxDoc;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b4bbbeff/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
index ec95d73..cb2b38e 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
@@ -79,60 +79,5 @@ namespace Lucene.Net.Index.Sorter
                 assertEquals("Cannot sort an index with a Sort that refers to the relevance score", e.Message);
             }
         }
-
-
-        // LUCENENET NOTE: According to this answer, you are supposed to be able to
-        // put tests in an abstract class to run them from multiple places with different
-        // test input. However, that doesn't seem to work in Visual Studio - it doesn't
-        // find any test in an abstract class. So, this is a (not so great) workaround
-        // to run the tests from multiple places without having to duplicate the test code.
-
-        [Test]
-        public override void TestBinaryDocValuesField()
-        {
-            base.TestBinaryDocValuesField();
-        }
-
-        [Test]
-        public override void TestDocsAndPositionsEnum()
-        {
-            base.TestDocsAndPositionsEnum();
-        }
-
-        [Test]
-        public override void TestDocsEnum()
-        {
-            base.TestDocsEnum();
-        }
-
-        [Test]
-        public override void TestNormValues()
-        {
-            base.TestNormValues();
-        }
-
-        [Test]
-        public override void TestNumericDocValuesField()
-        {
-            base.TestNumericDocValuesField();
-        }
-
-        [Test]
-        public override void TestSortedDocValuesField()
-        {
-            base.TestSortedDocValuesField();
-        }
-
-        [Test]
-        public override void TestSortedSetDocValuesField()
-        {
-            base.TestSortedSetDocValuesField();
-        }
-
-        [Test]
-        public override void TestTermVectors()
-        {
-            base.TestTermVectors();
-        }
     }
 }


[43/47] lucenenet git commit: Not sensible to make Core.Util.TestPriorityQueue.Benchmarks() fail when verbosity is turned off. Added AssumeTrue to skip the test when verbosity is not set and run it when it is (note this test doesn't exist in Java Lucene)

Posted by ni...@apache.org.
Not sensible to make Core.Util.TestPriorityQueue.Benchmarks() fail when verbosity is turned off. Added AssumeTrue to skip the test when verbosity is not set and run it when it is (note this test doesn't exist in Java Lucene).


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/2aaf3b5b
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/2aaf3b5b
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/2aaf3b5b

Branch: refs/heads/master
Commit: 2aaf3b5b50a596cbe4f9774e1d4ec1a9c2b1bea8
Parents: 2a79ede
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 05:28:38 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Oct 12 01:10:58 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Util/TestPriorityQueue.cs | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2aaf3b5b/src/Lucene.Net.Tests/core/Util/TestPriorityQueue.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestPriorityQueue.cs b/src/Lucene.Net.Tests/core/Util/TestPriorityQueue.cs
index 59bc78d..ed059c9 100644
--- a/src/Lucene.Net.Tests/core/Util/TestPriorityQueue.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestPriorityQueue.cs
@@ -616,10 +616,7 @@ namespace Lucene.Net.Util
         [Test, Explicit]
         public static void Benchmarks()
         {
-            if (!VERBOSE)
-            {
-                Assert.Fail("Turn VERBOSE on or otherwise you won't see the results.");
-            }
+            AssumeTrue("Turn VERBOSE on or otherwise you won't see the results.", VERBOSE);
                
             int maxSize = AtLeast(100000);
             PriorityQueue<int?> pq = new IntegerQueue(maxSize);


[34/47] lucenenet git commit: Removed Ignore attribute for Core.Index.TestSnapshotDeletionPolicy.TestSnapshotDeletionPolicy_Mem().

Posted by ni...@apache.org.
Removed Ignore attribute for Core.Index.TestSnapshotDeletionPolicy.TestSnapshotDeletionPolicy_Mem().


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/43fa4e52
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/43fa4e52
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/43fa4e52

Branch: refs/heads/master
Commit: 43fa4e52e5403d7ace305bf3d49d04bf204832eb
Parents: 964fca6
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 02:06:23 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Oct 12 01:10:54 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Index/TestSnapshotDeletionPolicy.cs | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/43fa4e52/src/Lucene.Net.Tests/core/Index/TestSnapshotDeletionPolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestSnapshotDeletionPolicy.cs b/src/Lucene.Net.Tests/core/Index/TestSnapshotDeletionPolicy.cs
index bc071b2..073c1c0 100644
--- a/src/Lucene.Net.Tests/core/Index/TestSnapshotDeletionPolicy.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestSnapshotDeletionPolicy.cs
@@ -118,7 +118,6 @@ namespace Lucene.Net.Index
             this.Snapshots = new List<IndexCommit>();
         }
 
-        [Ignore]
         [Test]
         public virtual void TestSnapshotDeletionPolicy_Mem()
         {


[11/47] lucenenet git commit: Fixed bugs that were causing the Codecs.SimpleText.TestSimpleTextTermVectorsFormat tests to fail.

Posted by ni...@apache.org.
Fixed bugs that were causing the Codecs.SimpleText.TestSimpleTextTermVectorsFormat tests to fail.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/31d66323
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/31d66323
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/31d66323

Branch: refs/heads/master
Commit: 31d66323d23417c9c1c82c460b67cacc2b24fe1c
Parents: f5cebaf
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Oct 8 17:08:56 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sat Oct 8 17:15:43 2016 +0700

----------------------------------------------------------------------
 .../SimpleText/SimpleTextTermVectorsReader.cs   | 24 ++++++++++++++------
 1 file changed, 17 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/31d66323/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
index 46b6338..19d2674 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
@@ -552,9 +552,15 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public override int NextDoc()
             {
-                if (_didNext || (_liveDocs != null && !_liveDocs.Get(0))) return (_doc = NO_MORE_DOCS);
-                _didNext = true;
-                return (_doc = 0);
+                if (!_didNext && (_liveDocs == null || _liveDocs.Get(0)))
+                {
+                    _didNext = true;
+                    return (_doc = 0);
+                }
+                else
+                {
+                    return (_doc = NO_MORE_DOCS);
+                }
             }
 
             public override int Advance(int target)
@@ -582,8 +588,12 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public override int NextPosition()
             {
-                Debug.Assert((_positions != null && _nextPos < _positions.Length) ||
-                             _startOffsets != null && _nextPos < _startOffsets.Length);
+                // LUCENENET NOTE: In Java, the assertion is being caught in the test (as an AssertionException).
+                // Technically, a "possible" (in fact "probable") scenario like this one, we should be throwing
+                // an exception, however doing that causes the checkIndex test to fail. The only logical thing we
+                // can do to make this compatible is to remove the assert.
+                //Debug.Assert((_positions != null && _nextPos < _positions.Length) ||
+                //             _startOffsets != null && _nextPos < _startOffsets.Length);
                 if (_positions != null)
                 {
                     return _positions[_nextPos++];
@@ -596,7 +606,9 @@ namespace Lucene.Net.Codecs.SimpleText
             public override int StartOffset()
             {
                 if (_startOffsets == null)
+                {
                     return -1;
+                }
 
                 return _startOffsets[_nextPos - 1];
             }
@@ -616,7 +628,5 @@ namespace Lucene.Net.Codecs.SimpleText
                 return 1;
             }
         }
-
     }
-
 }
\ No newline at end of file


[13/47] lucenenet git commit: Core.Store.FSDirectory: Added check to ensure deleted file was really deleted (similar to the way it works in Java).

Posted by ni...@apache.org.
Core.Store.FSDirectory: Added check to ensure deleted file was really deleted (similar to the way it works in Java).


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/2a4a9212
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/2a4a9212
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/2a4a9212

Branch: refs/heads/master
Commit: 2a4a92129063387234f333050ccf259eddb89a71
Parents: cef4d0d
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Oct 8 17:33:53 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:19 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Store/FSDirectory.cs | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a4a9212/src/Lucene.Net.Core/Store/FSDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/FSDirectory.cs b/src/Lucene.Net.Core/Store/FSDirectory.cs
index 1a60cdf..624c568 100644
--- a/src/Lucene.Net.Core/Store/FSDirectory.cs
+++ b/src/Lucene.Net.Core/Store/FSDirectory.cs
@@ -318,6 +318,10 @@ namespace Lucene.Net.Store
             try
             {
                 file.Delete();
+                if (File.Exists(file.FullName))
+                {
+                    throw new System.IO.IOException("Cannot delete " + file);
+                }
             }
             catch (Exception)
             {


[12/47] lucenenet git commit: Added the Codecs.SimpleText tests to the project

Posted by ni...@apache.org.
Added the Codecs.SimpleText tests to the project


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/cef4d0d7
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/cef4d0d7
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/cef4d0d7

Branch: refs/heads/master
Commit: cef4d0d7bf3100d3a1ea9a09344949957009392d
Parents: 31d6632
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 10 23:16:39 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Mon Oct 10 23:16:39 2016 +0700

----------------------------------------------------------------------
 .../Lucene.Net.Tests.Codecs.csproj              | 11 +++++
 .../SimpleText/TestSimpleTextDocValuesFormat.cs | 47 +++++++++++---------
 .../SimpleText/TestSimpleTextPostingsFormat.cs  | 42 ++++++++---------
 .../TestSimpleTextStoredFieldsFormat.cs         | 32 ++++++-------
 .../TestSimpleTextTermVectorsFormat.cs          | 32 +++++++------
 5 files changed, 88 insertions(+), 76 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cef4d0d7/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
index e92c615..991be3c 100644
--- a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
+++ b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
@@ -44,8 +44,16 @@
   <ItemGroup>
     <Compile Include="DiskDv\TestDiskDocValuesFormat.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="SimpleText\TestSimpleTextDocValuesFormat.cs" />
+    <Compile Include="SimpleText\TestSimpleTextPostingsFormat.cs" />
+    <Compile Include="SimpleText\TestSimpleTextStoredFieldsFormat.cs" />
+    <Compile Include="SimpleText\TestSimpleTextTermVectorsFormat.cs" />
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\Lucene.Net.Analysis.Common\Lucene.Net.Analysis.Common.csproj">
+      <Project>{4ADD0BBC-B900-4715-9526-D871DE8EEA64}</Project>
+      <Name>Lucene.Net.Analysis.Common</Name>
+    </ProjectReference>
     <ProjectReference Include="..\Lucene.Net.Codecs\Lucene.Net.Codecs.csproj">
       <Project>{3f79b6d4-4359-4f83-b64f-07f4f6262425}</Project>
       <Name>Lucene.Net.Codecs</Name>
@@ -66,6 +74,9 @@
   <ItemGroup>
     <None Include="packages.config" />
   </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cef4d0d7/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
index a6b8681..497e26f 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
@@ -1,7 +1,17 @@
-\ufeffnamespace org.apache.lucene.codecs.simpletext
-{
+\ufeffusing System;
+using Lucene.Net.Index;
+using NUnit.Framework;
+using Lucene.Net.Analysis;
+using Lucene.Net.Store;
+using Lucene.Net.Documents;
+using Lucene.Net.Util;
+using Lucene.Net.Search;
+using System.Diagnostics;
+using Lucene.Net.Analysis.Standard;
 
-	/*
+namespace Lucene.Net.Codecs.SimpleText
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,22 +28,19 @@
 	 * limitations under the License.
 	 */
 
-	using BaseDocValuesFormatTestCase = org.apache.lucene.index.BaseDocValuesFormatTestCase;
-
-	/// <summary>
-	/// Tests SimpleTextDocValuesFormat
-	/// </summary>
-	public class TestSimpleTextDocValuesFormat : BaseDocValuesFormatTestCase
-	{
-	  private readonly Codec codec = new SimpleTextCodec();
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Tests SimpleTextDocValuesFormat
+    /// </summary>
+    public class TestSimpleTextDocValuesFormat : BaseDocValuesFormatTestCase
+    {
+        private readonly Codec codec = new SimpleTextCodec();
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cef4d0d7/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
index ff628f8..a8cb997 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
@@ -1,7 +1,9 @@
-\ufeffnamespace org.apache.lucene.codecs.simpletext
-{
+\ufeffusing Lucene.Net.Index;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.SimpleText
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,25 +20,19 @@
 	 * limitations under the License.
 	 */
 
-	using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
-	using Nightly = org.apache.lucene.util.LuceneTestCase.Nightly;
-
-	/// <summary>
-	/// Tests SimpleText's postings
-	/// </summary>
-//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
-//ORIGINAL LINE: @Nightly public class TestSimpleTextPostingsFormat extends org.apache.lucene.index.BasePostingsFormatTestCase
-	public class TestSimpleTextPostingsFormat : BasePostingsFormatTestCase // please figure out why I am so horrendously slow!
-	{
-	  private readonly Codec codec = new SimpleTextCodec();
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Tests SimpleText's postings
+    /// </summary>
+    public class TestSimpleTextPostingsFormat : BasePostingsFormatTestCase // please figure out why I am so horrendously slow!
+    {
+        private readonly Codec codec = new SimpleTextCodec();
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cef4d0d7/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
index 2a7c3c2..5dab469 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.simpletext
-{
+\ufeffusing Lucene.Net.Attributes;
+using Lucene.Net.Index;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.SimpleText
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,18 +21,15 @@
 	 * limitations under the License.
 	 */
 
-	using BaseStoredFieldsFormatTestCase = org.apache.lucene.index.BaseStoredFieldsFormatTestCase;
-
-	public class TestSimpleTextStoredFieldsFormat : BaseStoredFieldsFormatTestCase
-	{
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return new SimpleTextCodec();
-		  }
-	  }
-	}
+    public class TestSimpleTextStoredFieldsFormat : BaseStoredFieldsFormatTestCase
+    {
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return new SimpleTextCodec();
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cef4d0d7/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
index ef41ca9..a5fe4c5 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
@@ -1,7 +1,9 @@
-\ufeffnamespace org.apache.lucene.codecs.simpletext
-{
+\ufeffusing Lucene.Net.Index;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.SimpleText
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,19 +20,15 @@
 	 * limitations under the License.
 	 */
 
-	using BaseTermVectorsFormatTestCase = org.apache.lucene.index.BaseTermVectorsFormatTestCase;
-
-	public class TestSimpleTextTermVectorsFormat : BaseTermVectorsFormatTestCase
-	{
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return new SimpleTextCodec();
-		  }
-	  }
-
-	}
+    public class TestSimpleTextTermVectorsFormat : BaseTermVectorsFormatTestCase
+    {
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return new SimpleTextCodec();
+            }
+        }
+    }
 }
\ No newline at end of file


[17/47] lucenenet git commit: Fixed comparison bug in Codecs.BlockTerms.BlockTermsReader

Posted by ni...@apache.org.
Fixed comparison bug in Codecs.BlockTerms.BlockTermsReader


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/aff260f6
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/aff260f6
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/aff260f6

Branch: refs/heads/master
Commit: aff260f628c024f2a20516e9e5c86745f0829738
Parents: 4524df4
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 10 23:52:37 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:21 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/aff260f6/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
index a627d7c..cbc8620 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
@@ -774,7 +774,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                 public override DocsAndPositionsEnum DocsAndPositions(Bits liveDocs, DocsAndPositionsEnum reuse,
                     int flags)
                 {
-                    if (_fieldReader._fieldInfo.FieldIndexOptions >= FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
+                    if (_fieldReader._fieldInfo.FieldIndexOptions.GetValueOrDefault().CompareTo(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) < 0)
                     {
                         // Positions were not indexed:
                         return null;


[42/47] lucenenet git commit: HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context.

Posted by ni...@apache.org.
HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/2a79edea
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/2a79edea
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/2a79edea

Branch: refs/heads/master
Commit: 2a79edea6359e1ee1f83269cc7dc3ef2753ebf2c
Parents: b4bbbef
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 10 21:46:32 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Oct 12 01:10:57 2016 +0700

----------------------------------------------------------------------
 .../BaseCompressingDocValuesFormatTestCase.cs   |   3 +
 .../Index/BaseDocValuesFormatTestCase.cs        | 156 +++---
 .../Index/BaseIndexFileFormatTestCase.cs        |   2 +-
 .../Index/BasePostingsFormatTestCase.cs         |  14 +-
 .../Index/BaseStoredFieldsFormatTestCase.cs     |  22 +-
 .../Index/BaseTermVectorsFormatTestCase.cs      |  14 +-
 .../Util/BaseDocIdSetTestCase.cs                |  10 +-
 .../BlockTerms/TestFixedGapPostingsFormat.cs    |  63 +++
 .../Bloom/TestBloomPostingsFormat.cs            |  63 +++
 .../DiskDv/TestDiskDocValuesFormat.cs           | 526 ++++++++++++++++++
 .../IntBlock/TestFixedIntBlockPostingsFormat.cs |  63 +++
 .../TestVariableIntBlockPostingsFormat.cs       |  63 +++
 .../Memory/TestDirectDocValuesFormat.cs         | 501 ++++++++++++++++++
 .../Memory/TestDirectPostingsFormat.cs          |  63 +++
 .../Memory/TestFSTOrdPostingsFormat.cs          |  63 +++
 .../Memory/TestFSTOrdPulsing41PostingsFormat.cs |  63 +++
 .../Memory/TestFSTPostingsFormat.cs             |  63 +++
 .../Memory/TestFSTPulsing41PostingsFormat.cs    |  63 +++
 .../Memory/TestMemoryDocValuesFormat.cs         | 526 ++++++++++++++++++
 .../Memory/TestMemoryPostingsFormat.cs          |  62 +++
 .../Pulsing/TestPulsingPostingsFormat.cs        |  63 +++
 .../Sep/TestSepPostingsFormat.cs                |  62 +++
 .../SimpleText/TestSimpleTextDocValuesFormat.cs | 500 ++++++++++++++++++
 .../SimpleText/TestSimpleTextPostingsFormat.cs  |  63 +++
 .../TestSimpleTextStoredFieldsFormat.cs         |  88 ++++
 .../TestSimpleTextTermVectorsFormat.cs          |  66 +++
 .../Index/Sorter/IndexSortingTest.cs            |  56 ++
 .../Index/Sorter/SorterTestBase.cs              |  16 +-
 .../Index/Sorter/SortingAtomicReaderTest.cs     |  56 ++
 .../Compressing/AbstractTestCompressionMode.cs  |  14 +-
 .../AbstractTestLZ4CompressionMode.cs           |   8 +-
 .../TestCompressingStoredFieldsFormat.cs        |  89 ++++
 .../TestCompressingTermVectorsFormat.cs         |  67 +++
 .../Compressing/TestFastCompressionMode.cs      |  81 +++
 .../Compressing/TestFastDecompressionMode.cs    |  81 +++
 .../Compressing/TestHighCompressionMode.cs      |  50 ++
 .../Lucene3x/TestLucene3xPostingsFormat.cs      |  63 +++
 .../Lucene3x/TestLucene3xStoredFieldsFormat.cs  |  84 +++
 .../Lucene3x/TestLucene3xTermVectorsFormat.cs   |  67 +++
 .../Lucene40/TestLucene40DocValuesFormat.cs     | 501 ++++++++++++++++++
 .../Lucene40/TestLucene40PostingsFormat.cs      |  63 +++
 .../Lucene40/TestLucene40StoredFieldsFormat.cs  |  89 ++++
 .../Lucene40/TestLucene40TermVectorsFormat.cs   |  67 +++
 .../Codecs/Lucene41/TestBlockPostingsFormat.cs  |  65 +++
 .../Lucene41/TestLucene41StoredFieldsFormat.cs  |  89 ++++
 .../Lucene42/TestLucene42DocValuesFormat.cs     | 526 ++++++++++++++++++
 .../Lucene45/TestLucene45DocValuesFormat.cs     | 527 +++++++++++++++++++
 .../Perfield/TestPerFieldDocValuesFormat.cs     | 501 ++++++++++++++++++
 .../Perfield/TestPerFieldPostingsFormat.cs      |  51 ++
 .../core/Index/TestDocValuesFormat.cs           | 503 ++++++++++++++++++
 .../core/Index/TestLogMergePolicy.cs            |  15 +
 .../core/Index/TestNumericDocValuesUpdates.cs   |   2 +-
 .../TestPersistentSnapshotDeletionPolicy.cs     |  50 ++
 .../core/Index/TestPostingsFormat.cs            |  50 ++
 .../core/Index/TestStoredFieldsFormat.cs        |  83 +++
 .../core/Index/TestTermVectorsFormat.cs         |  55 ++
 .../core/Index/TestTieredMergePolicy.cs         |  14 +
 .../core/Search/BaseTestRangeFilter.cs          |   2 +-
 .../Spans/TestSpanExplanationsOfNonMatches.cs   | 214 ++++++++
 .../TestComplexExplanationsOfNonMatches.cs      | 160 ++++++
 .../core/Search/TestExplanations.cs             |   2 +-
 .../core/Search/TestFieldCacheRangeFilter.cs    |  14 +
 .../core/Search/TestFieldCacheRewriteMethod.cs  |  17 +
 .../core/Search/TestMultiTermConstantScore.cs   |  14 +
 .../TestSimpleExplanationsOfNonMatches.cs       | 452 ++++++++++++++++
 .../core/Search/TestTermRangeFilter.cs          |  14 +
 .../core/Util/BaseSortTestCase.cs               |  18 +-
 .../core/Util/Packed/TestEliasFanoDocIdSet.cs   |  45 ++
 .../core/Util/TestDocIdBitSet.cs                |  46 ++
 .../core/Util/TestFixedBitSet.cs                |  45 ++
 .../core/Util/TestInPlaceMergeSorter.cs         |  64 +++
 .../core/Util/TestIntroSorter.cs                |  64 +++
 .../core/Util/TestOpenBitSet.cs                 |  44 ++
 .../core/Util/TestPForDeltaDocIdSet.cs          |  44 ++
 src/Lucene.Net.Tests/core/Util/TestTimSorter.cs |  64 +++
 .../core/Util/TestWAH8DocIdSet.cs               |  44 ++
 76 files changed, 8455 insertions(+), 140 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs
index d88ecb4..54d7fd5 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseCompressingDocValuesFormatTestCase.cs
@@ -45,6 +45,7 @@ namespace Lucene.Net.Index
             return size;
         }
 
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestUniqueValuesCompression()
         {
             Directory dir = new RAMDirectory();
@@ -85,6 +86,7 @@ namespace Lucene.Net.Index
             Assert.IsTrue(size2 < size1 + 8 * 20);
         }
 
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDateCompression()
         {
             Directory dir = new RAMDirectory();
@@ -115,6 +117,7 @@ namespace Lucene.Net.Index
             Assert.IsTrue(size2 < size1 + (PackedInts.BitsRequired(day) * 50) / 8);
         }
 
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSingleBigValueCompression()
         {
             Directory dir = new RAMDirectory();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
index ebc4c19..fa46ef8 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
@@ -84,7 +84,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestOneNumber()
         {
             Directory directory = NewDirectory();
@@ -119,7 +119,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestOneFloat()
         {
             Directory directory = NewDirectory();
@@ -154,7 +154,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoNumbers()
         {
             Directory directory = NewDirectory();
@@ -192,7 +192,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoBinaryValues()
         {
             Directory directory = NewDirectory();
@@ -233,7 +233,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoFieldsMixed()
         {
             Directory directory = NewDirectory();
@@ -273,7 +273,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestThreeFieldsMixed()
         {
             Directory directory = NewDirectory();
@@ -318,7 +318,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestThreeFieldsMixed2()
         {
             Directory directory = NewDirectory();
@@ -363,7 +363,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoDocumentsNumeric()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -392,7 +392,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoDocumentsMerged()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -436,7 +436,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBigNumericRange()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -465,7 +465,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBigNumericRange2()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -494,7 +494,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -534,7 +534,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBytesTwoDocumentsMerged()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -580,7 +580,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -620,7 +620,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedBytesTwoDocuments()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -652,7 +652,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedBytesThreeDocuments()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -691,7 +691,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedBytesTwoDocumentsMerged()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -742,7 +742,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedMergeAwayAllValues()
         {
             Directory directory = NewDirectory();
@@ -784,7 +784,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBytesWithNewline()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -810,7 +810,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestMissingSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -843,7 +843,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedTermsEnum()
         {
             Directory directory = NewDirectory();
@@ -916,7 +916,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestEmptySortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -948,7 +948,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestEmptyBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -980,7 +980,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestVeryLargeButLegalBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1009,7 +1009,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestVeryLargeButLegalSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1037,7 +1037,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestCodecUsesOwnBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1065,7 +1065,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestCodecUsesOwnSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1093,7 +1093,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestCodecUsesOwnBytesEachTime()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1128,7 +1128,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestCodecUsesOwnSortedBytesEachTime()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1166,7 +1166,7 @@ namespace Lucene.Net.Index
         /*
          * Simple test case to show how to use the API
          */
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocValuesSimple()
         {
             Directory dir = NewDirectory();
@@ -1211,7 +1211,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestRandomSortedBytes()
         {
             Directory dir = NewDirectory();
@@ -1488,7 +1488,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBooleanNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1498,7 +1498,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestByteNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1508,7 +1508,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestByteMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1518,7 +1518,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestShortNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1528,7 +1528,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestShortMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1538,7 +1538,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestIntNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1548,7 +1548,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestIntMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1558,7 +1558,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestLongNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1568,7 +1568,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestLongMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1643,7 +1643,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBinaryFixedLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1654,7 +1654,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBinaryVariableLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1788,7 +1788,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedFixedLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1799,7 +1799,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedFixedLengthVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1810,7 +1810,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedVariableLengthVsFieldCache()
         {
             int numIterations = AtLeast(1);
@@ -1820,7 +1820,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedVariableLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
@@ -1830,7 +1830,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetOneValue()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -1858,7 +1858,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -1896,7 +1896,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoDocumentsMerged()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -1941,7 +1941,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoValues()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -1974,7 +1974,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoValuesUnordered()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2007,7 +2007,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetThreeValuesTwoDocs()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2059,7 +2059,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoDocumentsLastMissing()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2094,7 +2094,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoDocumentsLastMissingMerge()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2131,7 +2131,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoDocumentsFirstMissing()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2167,7 +2167,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTwoDocumentsFirstMissingMerge()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2204,7 +2204,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetMergeAwayAllValues()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2235,7 +2235,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetTermsEnum()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2391,7 +2391,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetFixedLengthVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2403,7 +2403,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetVariableLengthVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2414,7 +2414,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetFixedLengthSingleValuedVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2426,7 +2426,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetVariableLengthSingleValuedVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2648,7 +2648,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetFixedLengthVsUninvertedField()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2660,7 +2660,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetVariableLengthVsUninvertedField()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -2671,7 +2671,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestGCDCompression()
         {
             int numIterations = AtLeast(1);
@@ -2704,13 +2704,13 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestZeros()
         {
             DoTestNumericsVsStoredFields(0, 0);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestZeroOrMin()
         {
             // try to make GCD compression fail if the format did not anticipate that
@@ -2738,7 +2738,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoNumbersOneMissing()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2769,7 +2769,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoNumbersOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2801,7 +2801,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestThreeNumbersOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2839,7 +2839,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoBytesOneMissing()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2873,7 +2873,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwoBytesOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2908,7 +2908,7 @@ namespace Lucene.Net.Index
             directory.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestThreeBytesOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -2951,7 +2951,7 @@ namespace Lucene.Net.Index
         }
 
         // LUCENE-4853
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestHugeBinaryValues()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -3072,7 +3072,7 @@ namespace Lucene.Net.Index
         }
 
         // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestHugeBinaryValueLimit()
         {
             // We only test DVFormats that have a limit
@@ -3157,7 +3157,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestThreads()
         {
             Directory dir = NewDirectory();
@@ -3276,7 +3276,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// Tests dv against stored fields with threads (all types + missing)
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestThreads2()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
@@ -3466,7 +3466,7 @@ namespace Lucene.Net.Index
         }
 
         // LUCENE-5218
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestEmptyBinaryValueOnPageSizes()
         {
             // Test larger and larger power-of-two sized values,

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs
index d65a88b..9a49a6f 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseIndexFileFormatTestCase.cs
@@ -90,7 +90,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// The purpose of this test is to make sure that bulk merge doesn't accumulate useless data over runs.
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestMergeStability()
         {
             Directory dir = NewDirectory();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
index b9dfb8b..ffef930 100644
--- a/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BasePostingsFormatTestCase.cs
@@ -1245,43 +1245,43 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsOnly()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_ONLY, false);
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsAndFreqs()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS, false);
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsAndFreqsAndPositions()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS, false);
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsAndFreqsAndPositionsAndPayloads()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS, true);
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsAndFreqsAndPositionsAndOffsets()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS, false);
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
         {
             TestFull(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS, true);
         }
 
-        [Test, Timeout(300000)]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestRandom()
         {
             int iters = 5;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
index a63eb84..2acb5fa 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
@@ -74,7 +74,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestRandomStoredFields()
         {
             Directory dir = NewDirectory();
@@ -190,7 +190,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         // LUCENE-1727: make sure doc fields are stored in order
         public virtual void TestStoredFieldsOrder()
         {
@@ -227,7 +227,7 @@ namespace Lucene.Net.Index
             d.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         // LUCENE-1219
         public virtual void TestBinaryFieldOffsetLength()
         {
@@ -261,7 +261,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestNumericField()
         {
             Directory dir = NewDirectory();
@@ -346,7 +346,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestIndexedBit()
         {
             Directory dir = NewDirectory();
@@ -365,7 +365,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestReadSkip()
         {
             Directory dir = NewDirectory();
@@ -420,7 +420,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test, Timeout(300000)]
+        // [Test, Timeout(300000)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestEmptyDocs()
         {
             Directory dir = NewDirectory();
@@ -449,7 +449,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test, Timeout(300000)]
+        // [Test, Timeout(300000)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestConcurrentReads()
         {
             Directory dir = NewDirectory();
@@ -564,7 +564,7 @@ namespace Lucene.Net.Index
             return result;
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestWriteReadMerge()
         {
             // get another codec, other than the default: so we are merging segments across different codecs
@@ -670,7 +670,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test, LongRunningTest, Timeout(int.MaxValue)]
+        // [Test, LongRunningTest, Timeout(int.MaxValue)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBigDocuments()
         {
             // "big" as "much bigger than the chunk size"
@@ -747,7 +747,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBulkMergeWithDeletes()
         {
             int numDocs = AtLeast(200);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
index 85207ad..5e5b20e 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
@@ -668,7 +668,7 @@ namespace Lucene.Net.Index
             return (new IndexSearcher(reader)).Search(new TermQuery(new Term("id", id)), 1).ScoreDocs[0].Doc;
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         // only one doc with vectors
         public virtual void TestRareVectors()
         {
@@ -715,7 +715,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestHighFreqs()
         {
             RandomDocumentFactory docFactory = new RandomDocumentFactory(this, 3, 5);
@@ -737,7 +737,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test, LongRunningTest, Timeout(int.MaxValue)]
+        // [Test, LongRunningTest, Timeout(int.MaxValue)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestLotsOfFields()
         {
             RandomDocumentFactory docFactory = new RandomDocumentFactory(this, 500, 10);
@@ -755,7 +755,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test, Timeout(300000)]
+        // [Test, Timeout(300000)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         // different options for the same field
         public virtual void TestMixedOptions()
         {
@@ -790,7 +790,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestRandom()
         {
             RandomDocumentFactory docFactory = new RandomDocumentFactory(this, 5, 20);
@@ -817,7 +817,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestMerge()
         {
             RandomDocumentFactory docFactory = new RandomDocumentFactory(this, 5, 20);
@@ -866,7 +866,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         // run random tests from different threads to make sure the per-thread clones
         // don't share mutable data
         public virtual void TestClone()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs b/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
index 2cfe630..e69ed7c 100644
--- a/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
@@ -77,7 +77,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Test length=0.
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestNoBit()
         {
             BitArray bs = new BitArray(1);
@@ -88,7 +88,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Test length=1.
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void Test1Bit()
         {
             BitArray bs = new BitArray(1);
@@ -103,7 +103,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Test length=2.
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void Test2Bits()
         {
             BitArray bs = new BitArray(2);
@@ -122,8 +122,8 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Compare the content of the set against a <seealso cref="BitSet"/>.
         /// </summary>
-        [Test, Timeout(150000)]
-        [LongRunningTest]
+        // [Test, Timeout(150000)] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
+        //[LongRunningTest]
         public virtual void TestAgainstBitSet()
         {
             int numBits = TestUtil.NextInt(Random(), 100, 1 << 20);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
index a66f96c..6d913b5 100644
--- a/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
@@ -38,5 +38,68 @@ namespace Lucene.Net.Codecs.BlockTerms
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
index d4e1286..d19e11a 100644
--- a/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
@@ -35,5 +35,68 @@ namespace Lucene.Net.Codecs.Bloom
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
index a0b868b..cd69092 100644
--- a/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
@@ -36,5 +36,531 @@ namespace Lucene.Net.Codecs.DiskDV
                 return codec;
             }
         }
+
+
+        #region BaseCompressingDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestUniqueValuesCompression()
+        {
+            base.TestUniqueValuesCompression();
+        }
+
+        [Test]
+        public override void TestDateCompression()
+        {
+            base.TestDateCompression();
+        }
+
+        [Test]
+        public override void TestSingleBigValueCompression()
+        {
+            base.TestSingleBigValueCompression();
+        }
+
+        #endregion
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
index 1cd9e4b..26b2684 100644
--- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
@@ -36,5 +36,68 @@ namespace Lucene.Net.Codecs.IntBlock
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
index 0b74a74..c255c90 100644
--- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
@@ -41,5 +41,68 @@ namespace Lucene.Net.Codecs.IntBlock
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file


[32/47] lucenenet git commit: Increased timeouts on tests that were failing because of the 20 second limit imposed on all core tests.

Posted by ni...@apache.org.
Increased timeouts on tests that were failing because of the 20 second limit imposed on all core tests.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/e72a7f83
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/e72a7f83
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/e72a7f83

Branch: refs/heads/master
Commit: e72a7f83462bcefa6020963fcd1462f0ffb011e9
Parents: e77e6a1
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 10 18:25:54 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Oct 12 01:10:45 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs         | 2 +-
 src/Lucene.Net.Tests/core/Index/TestIndexWriterMerging.cs    | 2 +-
 src/Lucene.Net.Tests/core/Index/TestMixedDocValuesUpdates.cs | 2 +-
 src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs          | 2 +-
 src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs      | 2 +-
 src/Lucene.Net.Tests/core/Util/StressRamUsageEstimator.cs    | 3 ++-
 6 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e72a7f83/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs b/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs
index 06c3dbb..f3e8e9d 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs
@@ -169,7 +169,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// checks the two indexes are equivalent
         /// </summary>
-        [Test]
+        [Test, Timeout(120000)]
         public virtual void TestEquals()
         {
             AssertReaderEquals(Info, LeftReader, RightReader);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e72a7f83/src/Lucene.Net.Tests/core/Index/TestIndexWriterMerging.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexWriterMerging.cs b/src/Lucene.Net.Tests/core/Index/TestIndexWriterMerging.cs
index 5181ae0..f689f64 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexWriterMerging.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexWriterMerging.cs
@@ -349,7 +349,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        [Test, Timeout(80000)]
         public virtual void TestNoWaitClose()
         {
             Directory directory = NewDirectory();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e72a7f83/src/Lucene.Net.Tests/core/Index/TestMixedDocValuesUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestMixedDocValuesUpdates.cs b/src/Lucene.Net.Tests/core/Index/TestMixedDocValuesUpdates.cs
index 5fd7339..eb666e8 100644
--- a/src/Lucene.Net.Tests/core/Index/TestMixedDocValuesUpdates.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestMixedDocValuesUpdates.cs
@@ -488,7 +488,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        [Test, Timeout(80000)]
         public virtual void TestTonsOfUpdates()
         {
             // LUCENE-5248: make sure that when there are many updates, we don't use too much RAM

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e72a7f83/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs b/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs
index 93d3414..51c68e5 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs
@@ -190,7 +190,7 @@ namespace Lucene.Net.Search
             base.TearDown();
         }
 
-        [Test, LongRunningTest]
+        [Test, LongRunningTest, Timeout(90000)]
         public virtual void TestQueries()
         {
             // because the first page has a null 'after', we get a normal collector.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e72a7f83/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs b/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs
index d1057a9..ad72757 100644
--- a/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs
+++ b/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs
@@ -1119,7 +1119,7 @@ namespace Lucene.Net.Util.Packed
         }
 
 
-        [Test]
+        [Test, Timeout(80000)]
         public virtual void TestAppendingLongBuffer()
         {
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e72a7f83/src/Lucene.Net.Tests/core/Util/StressRamUsageEstimator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/StressRamUsageEstimator.cs b/src/Lucene.Net.Tests/core/Util/StressRamUsageEstimator.cs
index c0b8533..0a63554 100644
--- a/src/Lucene.Net.Tests/core/Util/StressRamUsageEstimator.cs
+++ b/src/Lucene.Net.Tests/core/Util/StressRamUsageEstimator.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Attributes;
 using Lucene.Net.Support;
 using NUnit.Framework;
 using System;
@@ -119,7 +120,7 @@ namespace Lucene.Net.Util
             return s;
         }
 
-        [Test, Timeout(180000)]
+        [Test, LongRunningTest, Timeout(300000)]
         public virtual void TestSimpleByteArrays()
         {
             object[][] all = new object[0][];


[45/47] lucenenet git commit: Fixed missing using clause and invalid attempt to decrement countdown below 0 (for some reason 2 doesn't work, but checking the count before decrementing does).

Posted by ni...@apache.org.
Fixed missing using clause and invalid attempt to decrement countdown below 0 (for some reason 2 doesn't work, but checking the count before decrementing does).


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/fbc171b3
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/fbc171b3
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/fbc171b3

Branch: refs/heads/master
Commit: fbc171b3930ff58b9087ea9e4affeed0f14c1f7c
Parents: eb6fd3a
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 07:40:45 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Oct 12 01:10:59 2016 +0700

----------------------------------------------------------------------
 .../core/Index/TestIndexWriterWithThreads.cs        | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fbc171b3/src/Lucene.Net.Tests/core/Index/TestIndexWriterWithThreads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexWriterWithThreads.cs b/src/Lucene.Net.Tests/core/Index/TestIndexWriterWithThreads.cs
index e80286e..103248f 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexWriterWithThreads.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexWriterWithThreads.cs
@@ -631,17 +631,21 @@ namespace Lucene.Net.Index
                     Document doc = new Document();
                     Field field = OuterInstance.NewTextField("field", "testData", Field.Store.YES);
                     doc.Add(field);
-                    IndexWriter writer = new IndexWriter(Dir, OuterInstance.NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random())));
-                    IwConstructed.Signal();
-                    StartIndexing_Renamed.Wait();
-                    writer.AddDocument(doc);
-                    writer.Dispose();
+                    using (IndexWriter writer = new IndexWriter(Dir, OuterInstance.NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random()))))
+                    {
+                        if (IwConstructed.CurrentCount > 0)
+                        {
+                            IwConstructed.Signal();
+                        }
+                        StartIndexing_Renamed.Wait();
+                        writer.AddDocument(doc);
+                    }
                 }
                 catch (Exception e)
                 {
                     Failed = true;
                     Failure = e;
-                    Console.WriteLine(e.StackTrace);
+                    Console.WriteLine(e.ToString());
                     return;
                 }
             }


[38/47] lucenenet git commit: Refactored TestFramework.Util.VirtualMethod and Core.Util.TestVirtualMethod to avoid having to deal with subclasses of test classes (that mess up test context).

Posted by ni...@apache.org.
Refactored TestFramework.Util.VirtualMethod and Core.Util.TestVirtualMethod to avoid having to deal with subclasses of test classes (that mess up test context).


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/70ae1962
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/70ae1962
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/70ae1962

Branch: refs/heads/master
Commit: 70ae1962578d92b50f5ec0592cfaab5afd028be1
Parents: 2de5494
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 03:09:36 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Oct 12 01:10:56 2016 +0700

----------------------------------------------------------------------
 .../Search/AssertingBulkScorer.cs               |  4 +-
 .../Util/VirtualMethod.cs                       |  6 ++-
 .../core/Util/TestVirtualMethod.cs              | 45 ++++++++++++--------
 3 files changed, 34 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/70ae1962/src/Lucene.Net.TestFramework/Search/AssertingBulkScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Search/AssertingBulkScorer.cs b/src/Lucene.Net.TestFramework/Search/AssertingBulkScorer.cs
index 3d83eed..ea67747 100644
--- a/src/Lucene.Net.TestFramework/Search/AssertingBulkScorer.cs
+++ b/src/Lucene.Net.TestFramework/Search/AssertingBulkScorer.cs
@@ -28,8 +28,8 @@ namespace Lucene.Net.Search
     /// Wraps a Scorer with additional checks </summary>
     public class AssertingBulkScorer : BulkScorer
     {
-        private static readonly VirtualMethod<BulkScorer> SCORE_COLLECTOR = new VirtualMethod<BulkScorer>(typeof(BulkScorer), "Score", typeof(Collector));
-        private static readonly VirtualMethod<BulkScorer> SCORE_COLLECTOR_RANGE = new VirtualMethod<BulkScorer>(typeof(BulkScorer), "Score", typeof(Collector), typeof(int));
+        private static readonly VirtualMethod SCORE_COLLECTOR = new VirtualMethod(typeof(BulkScorer), "Score", typeof(Collector));
+        private static readonly VirtualMethod SCORE_COLLECTOR_RANGE = new VirtualMethod(typeof(BulkScorer), "Score", typeof(Collector), typeof(int));
 
         public static BulkScorer Wrap(Random random, BulkScorer other)
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/70ae1962/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs b/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs
index 7cc661b..716a867 100644
--- a/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs
+++ b/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs
@@ -56,7 +56,9 @@ namespace Lucene.Net.Util
     ///
     /// @lucene.internal
     /// </summary>
-    public sealed class VirtualMethod<C>
+    // LUCENENET NOTE: Pointless to make this class generic, since the generic type is never used (the Type class in .NET
+    // is not generic).
+    public sealed class VirtualMethod
     {
         private static readonly ISet<MethodInfo> SingletonSet = new ConcurrentHashSet<MethodInfo>(new HashSet<MethodInfo>());
 
@@ -156,7 +158,7 @@ namespace Lucene.Net.Util
         ///  <li>&lt; 1, iff {@code m2} is overridden in a subclass of the class overriding/declaring {@code m1}
         ///  <li>0, iff both methods are overridden in the same class (or are not overridden at all)
         /// </ul> </returns>
-        public static int compareImplementationDistance<C>(Type clazz, VirtualMethod<C> m1, VirtualMethod<C> m2)
+        public static int CompareImplementationDistance(Type clazz, VirtualMethod m1, VirtualMethod m2)
         {
             return Convert.ToInt32(m1.GetImplementationDistance(clazz)).CompareTo(m2.GetImplementationDistance(clazz));
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/70ae1962/src/Lucene.Net.Tests/core/Util/TestVirtualMethod.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestVirtualMethod.cs b/src/Lucene.Net.Tests/core/Util/TestVirtualMethod.cs
index 14488af..30c8b00 100644
--- a/src/Lucene.Net.Tests/core/Util/TestVirtualMethod.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestVirtualMethod.cs
@@ -23,24 +23,33 @@ namespace Lucene.Net.Util
     [TestFixture]
     public class TestVirtualMethod : LuceneTestCase
     {
-        private static readonly VirtualMethod<TestVirtualMethod> PublicTestMethod;
-        private static readonly VirtualMethod<TestVirtualMethod> ProtectedTestMethod;
+        private static readonly VirtualMethod PublicTestMethod;
+        private static readonly VirtualMethod ProtectedTestMethod;
 
         static TestVirtualMethod()
         {
-            PublicTestMethod = new VirtualMethod<TestVirtualMethod>(typeof(TestVirtualMethod), "PublicTest", typeof(string));
-            ProtectedTestMethod = new VirtualMethod<TestVirtualMethod>(typeof(TestVirtualMethod), "ProtectedTest", typeof(int));
+            PublicTestMethod = new VirtualMethod(typeof(BaseTestVirtualMethod), "PublicTest", typeof(string));
+            ProtectedTestMethod = new VirtualMethod(typeof(BaseTestVirtualMethod), "ProtectedTest", typeof(int));
         }
 
-        public virtual void PublicTest(string test)
+        /// <summary>
+        /// LUCENENET specific class used here because inheriting test classes messes up the context
+        /// that the tests are run in. So, we substitute a class that has no tests.
+        /// </summary>
+        public class BaseTestVirtualMethod
         {
-        }
 
-        protected virtual void ProtectedTest(int test)
-        {
+            public virtual void PublicTest(string test)
+            {
+            }
+
+            protected virtual void ProtectedTest(int test)
+            {
+            }
+
         }
 
-        internal class TestClass1 : TestVirtualMethod
+        internal class TestClass1 : BaseTestVirtualMethod
         {
             public override void PublicTest(string test)
             {
@@ -65,7 +74,7 @@ namespace Lucene.Net.Util
             }
         }
 
-        internal class TestClass4 : TestVirtualMethod
+        internal class TestClass4 : BaseTestVirtualMethod
         {
         }
 
@@ -76,22 +85,24 @@ namespace Lucene.Net.Util
         [Test]
         public virtual void TestGeneral()
         {
-            Assert.AreEqual(0, PublicTestMethod.GetImplementationDistance(this.GetType()));
+            // LUCENENET: Substituted BaseTestVirtualMethod for this class, but the logic is the same.
+            Assert.AreEqual(0, PublicTestMethod.GetImplementationDistance(typeof(BaseTestVirtualMethod)));
             Assert.AreEqual(1, PublicTestMethod.GetImplementationDistance(typeof(TestClass1)));
             Assert.AreEqual(1, PublicTestMethod.GetImplementationDistance(typeof(TestClass2)));
             Assert.AreEqual(3, PublicTestMethod.GetImplementationDistance(typeof(TestClass3)));
             Assert.IsFalse(PublicTestMethod.IsOverriddenAsOf(typeof(TestClass4)));
             Assert.IsFalse(PublicTestMethod.IsOverriddenAsOf(typeof(TestClass5)));
 
-            Assert.AreEqual(0, ProtectedTestMethod.GetImplementationDistance(this.GetType()));
+            // LUCENENET: Substituted BaseTestVirtualMethod for this class, but the logic is the same.
+            Assert.AreEqual(0, ProtectedTestMethod.GetImplementationDistance(typeof(BaseTestVirtualMethod)));
             Assert.AreEqual(1, ProtectedTestMethod.GetImplementationDistance(typeof(TestClass1)));
             Assert.AreEqual(2, ProtectedTestMethod.GetImplementationDistance(typeof(TestClass2)));
             Assert.AreEqual(2, ProtectedTestMethod.GetImplementationDistance(typeof(TestClass3)));
             Assert.IsFalse(ProtectedTestMethod.IsOverriddenAsOf(typeof(TestClass4)));
             Assert.IsFalse(ProtectedTestMethod.IsOverriddenAsOf(typeof(TestClass5)));
 
-            Assert.IsTrue(VirtualMethod<TestVirtualMethod>.compareImplementationDistance(typeof(TestClass3), PublicTestMethod, ProtectedTestMethod) > 0);
-            Assert.AreEqual(0, VirtualMethod<TestVirtualMethod>.compareImplementationDistance(typeof(TestClass5), PublicTestMethod, ProtectedTestMethod));
+            Assert.IsTrue(VirtualMethod.CompareImplementationDistance(typeof(TestClass3), PublicTestMethod, ProtectedTestMethod) > 0);
+            Assert.AreEqual(0, VirtualMethod.CompareImplementationDistance(typeof(TestClass5), PublicTestMethod, ProtectedTestMethod));
         }
 
         [Test]
@@ -110,7 +121,7 @@ namespace Lucene.Net.Util
 
             try
             {
-                new VirtualMethod<TestVirtualMethod>(typeof(TestVirtualMethod), "bogus");
+                new VirtualMethod(typeof(BaseTestVirtualMethod), "bogus");
                 Assert.Fail("Method bogus() does not exist, so IAE should be thrown");
             }
             catch (System.ArgumentException arg)
@@ -120,7 +131,7 @@ namespace Lucene.Net.Util
 
             try
             {
-                new VirtualMethod<TestClass2>(typeof(TestClass2), "PublicTest", typeof(string));
+                new VirtualMethod(typeof(TestClass2), "PublicTest", typeof(string));
             }
             catch (System.ArgumentException arg)
             {
@@ -130,7 +141,7 @@ namespace Lucene.Net.Util
             try
             {
                 // try to create a second instance of the same baseClass / method combination
-                new VirtualMethod<TestVirtualMethod>(typeof(TestVirtualMethod), "PublicTest", typeof(string));
+                new VirtualMethod(typeof(BaseTestVirtualMethod), "PublicTest", typeof(string));
                 Assert.Fail("Violating singleton status succeeded");
             }
             catch (System.ArgumentException arg)


[33/47] lucenenet git commit: Made BaseDocIdSetTestCase test methods virtual.

Posted by ni...@apache.org.
Made BaseDocIdSetTestCase test methods virtual.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/bd64873c
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/bd64873c
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/bd64873c

Branch: refs/heads/master
Commit: bd64873c830fa5632d810476b594c07f2b6a55e7
Parents: e72a7f8
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 00:29:39 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Oct 12 01:10:53 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/bd64873c/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs b/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
index 7ef0073..2cfe630 100644
--- a/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
@@ -78,7 +78,7 @@ namespace Lucene.Net.Util
         /// Test length=0.
         /// </summary>
         [Test]
-        public void TestNoBit()
+        public virtual void TestNoBit()
         {
             BitArray bs = new BitArray(1);
             T copy = CopyOf(bs, 0);
@@ -89,7 +89,7 @@ namespace Lucene.Net.Util
         /// Test length=1.
         /// </summary>
         [Test]
-        public void Test1Bit()
+        public virtual void Test1Bit()
         {
             BitArray bs = new BitArray(1);
             if (Random().NextBoolean())
@@ -104,7 +104,7 @@ namespace Lucene.Net.Util
         /// Test length=2.
         /// </summary>
         [Test]
-        public void Test2Bits()
+        public virtual void Test2Bits()
         {
             BitArray bs = new BitArray(2);
             if (Random().NextBoolean())
@@ -124,7 +124,7 @@ namespace Lucene.Net.Util
         /// </summary>
         [Test, Timeout(150000)]
         [LongRunningTest]
-        public void TestAgainstBitSet()
+        public virtual void TestAgainstBitSet()
         {
             int numBits = TestUtil.NextInt(Random(), 100, 1 << 20);
             // test various random sets with various load factors


[40/47] lucenenet git commit: HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context.

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs
index acdf73c..998b942 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingStoredFieldsFormat.cs
@@ -100,5 +100,94 @@ namespace Lucene.Net.Codecs.Compressing
                 this.OuterInstance = outerInstance;
             }
         }
+
+
+        #region BaseStoredFieldsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestRandomStoredFields()
+        {
+            base.TestRandomStoredFields();
+        }
+
+        [Test]
+        // LUCENE-1727: make sure doc fields are stored in order
+        public override void TestStoredFieldsOrder()
+        {
+            base.TestStoredFieldsOrder();
+        }
+
+        [Test]
+        // LUCENE-1219
+        public override void TestBinaryFieldOffsetLength()
+        {
+            base.TestBinaryFieldOffsetLength();
+        }
+
+        [Test]
+        public override void TestNumericField()
+        {
+            base.TestNumericField();
+        }
+
+        [Test]
+        public override void TestIndexedBit()
+        {
+            base.TestIndexedBit();
+        }
+
+        [Test]
+        public override void TestReadSkip()
+        {
+            base.TestReadSkip();
+        }
+
+        [Test]
+        public override void TestEmptyDocs()
+        {
+            base.TestEmptyDocs();
+        }
+
+        [Test]
+        public override void TestConcurrentReads()
+        {
+            base.TestConcurrentReads();
+        }
+
+        [Test]
+        public override void TestWriteReadMerge()
+        {
+            base.TestWriteReadMerge();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestBigDocuments()
+        {
+            base.TestBigDocuments();
+        }
+
+        [Test]
+        public override void TestBulkMergeWithDeletes()
+        {
+            base.TestBulkMergeWithDeletes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
index 90b06cf..709af74 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
@@ -84,5 +84,72 @@ namespace Lucene.Net.Codecs.Compressing
             iw.Dispose();
             dir.Dispose();
         }
+
+
+        #region BaseTermVectorsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        // only one doc with vectors
+        public override void TestRareVectors()
+        {
+            base.TestRareVectors();
+        }
+
+        [Test]
+        public override void TestHighFreqs()
+        {
+            base.TestHighFreqs();
+        }
+
+        [Test]
+        public override void TestLotsOfFields()
+        {
+            base.TestLotsOfFields();
+        }
+
+        [Test]
+        // different options for the same field
+        public override void TestMixedOptions()
+        {
+            base.TestMixedOptions();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test, Timeout(30000)]
+        public override void TestMerge()
+        {
+            base.TestMerge();
+        }
+
+        [Test]
+        // run random tests from different threads to make sure the per-thread clones
+        // don't share mutable data
+        public override void TestClone()
+        {
+            base.TestClone();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs
index dd7d708..6a74a51 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastCompressionMode.cs
@@ -28,5 +28,86 @@ namespace Lucene.Net.Codecs.Compressing
             base.SetUp();
             Mode = CompressionMode.FAST;
         }
+
+
+        #region AbstractTestLZ4CompressionMode
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestShortLiteralsAndMatchs()
+        {
+            base.TestShortLiteralsAndMatchs();
+        }
+
+        [Test]
+        public override void TestLongMatchs()
+        {
+            base.TestLongMatchs();
+        }
+
+        [Test]
+        public override void TestLongLiterals()
+        {
+            base.TestLongLiterals();
+        }
+
+        [Test]
+        public override void TestMatchRightBeforeLastLiterals()
+        {
+            base.TestMatchRightBeforeLastLiterals();
+        }
+
+        #endregion
+
+        #region AbstractTestCompressionMode
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDecompress()
+        {
+            base.TestDecompress();
+        }
+
+        [Test]
+        public override void TestPartialDecompress()
+        {
+            base.TestPartialDecompress();
+        }
+
+        [Test]
+        public override void TestEmptySequence()
+        {
+            base.TestEmptySequence();
+        }
+
+        [Test]
+        public override void TestShortSequence()
+        {
+            base.TestShortSequence();
+        }
+
+        [Test]
+        public override void TestIncompressible()
+        {
+            base.TestIncompressible();
+        }
+
+        [Test]
+        public override void TestConstant()
+        {
+            base.TestConstant();
+        }
+
+        [Test]
+        public override void TestLUCENE5201()
+        {
+            base.TestLUCENE5201();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs
index d7fc0b0..b90a582 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestFastDecompressionMode.cs
@@ -38,5 +38,86 @@ namespace Lucene.Net.Codecs.Compressing
             Assert.IsTrue(compressed.Length <= compressed2.Length);
             return compressed;
         }
+
+
+        #region AbstractTestLZ4CompressionMode
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestShortLiteralsAndMatchs()
+        {
+            base.TestShortLiteralsAndMatchs();
+        }
+
+        [Test]
+        public override void TestLongMatchs()
+        {
+            base.TestLongMatchs();
+        }
+
+        [Test]
+        public override void TestLongLiterals()
+        {
+            base.TestLongLiterals();
+        }
+
+        [Test]
+        public override void TestMatchRightBeforeLastLiterals()
+        {
+            base.TestMatchRightBeforeLastLiterals();
+        }
+
+        #endregion
+
+        #region AbstractTestCompressionMode
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDecompress()
+        {
+            base.TestDecompress();
+        }
+
+        [Test]
+        public override void TestPartialDecompress()
+        {
+            base.TestPartialDecompress();
+        }
+
+        [Test]
+        public override void TestEmptySequence()
+        {
+            base.TestEmptySequence();
+        }
+
+        [Test]
+        public override void TestShortSequence()
+        {
+            base.TestShortSequence();
+        }
+
+        [Test]
+        public override void TestIncompressible()
+        {
+            base.TestIncompressible();
+        }
+
+        [Test]
+        public override void TestConstant()
+        {
+            base.TestConstant();
+        }
+
+        [Test]
+        public override void TestLUCENE5201()
+        {
+            base.TestLUCENE5201();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs
index eebcda1..679d1f0 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestHighCompressionMode.cs
@@ -28,5 +28,55 @@ namespace Lucene.Net.Codecs.Compressing
             base.SetUp();
             Mode = CompressionMode.HIGH_COMPRESSION;
         }
+
+
+        #region AbstractTestCompressionMode
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDecompress()
+        {
+            base.TestDecompress();
+        }
+
+        [Test]
+        public override void TestPartialDecompress()
+        {
+            base.TestPartialDecompress();
+        }
+
+        [Test]
+        public override void TestEmptySequence()
+        {
+            base.TestEmptySequence();
+        }
+
+        [Test]
+        public override void TestShortSequence()
+        {
+            base.TestShortSequence();
+        }
+
+        [Test]
+        public override void TestIncompressible()
+        {
+            base.TestIncompressible();
+        }
+
+        [Test]
+        public override void TestConstant()
+        {
+            base.TestConstant();
+        }
+
+        [Test]
+        public override void TestLUCENE5201()
+        {
+            base.TestLUCENE5201();
+        }
+        #endregion
+
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs
index cf1bafc..0ab9a7b 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xPostingsFormat.cs
@@ -42,5 +42,68 @@ namespace Lucene.Net.Codecs.Lucene3x
                 return Codec_Renamed;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
index b28f86a..d3d0889 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xStoredFieldsFormat.cs
@@ -52,5 +52,89 @@ namespace Lucene.Net.Codecs.Lucene3x
             // for 3.x: we currently cannot take an index with existing 4.x segments
             // and merge into newly formed 3.x segments.
         }
+
+
+
+        #region BaseStoredFieldsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestRandomStoredFields()
+        {
+            base.TestRandomStoredFields();
+        }
+
+        [Test]
+        // LUCENE-1727: make sure doc fields are stored in order
+        public override void TestStoredFieldsOrder()
+        {
+            base.TestStoredFieldsOrder();
+        }
+
+        [Test]
+        // LUCENE-1219
+        public override void TestBinaryFieldOffsetLength()
+        {
+            base.TestBinaryFieldOffsetLength();
+        }
+
+        [Test]
+        public override void TestNumericField()
+        {
+            base.TestNumericField();
+        }
+
+        [Test]
+        public override void TestIndexedBit()
+        {
+            base.TestIndexedBit();
+        }
+
+        [Test]
+        public override void TestReadSkip()
+        {
+            base.TestReadSkip();
+        }
+
+        [Test]
+        public override void TestEmptyDocs()
+        {
+            base.TestEmptyDocs();
+        }
+
+        [Test]
+        public override void TestConcurrentReads()
+        {
+            base.TestConcurrentReads();
+        }
+
+        [Test, Timeout(120000)]
+        public override void TestBigDocuments()
+        {
+            base.TestBigDocuments();
+        }
+
+        [Test]
+        public override void TestBulkMergeWithDeletes()
+        {
+            base.TestBulkMergeWithDeletes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs
index 1cf090b..5756752 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene3x/TestLucene3xTermVectorsFormat.cs
@@ -46,5 +46,72 @@ namespace Lucene.Net.Codecs.Lucene3x
         {
             return ValidOptions(Options.NONE, Options.POSITIONS_AND_OFFSETS);
         }
+
+
+        #region BaseTermVectorsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        // only one doc with vectors
+        public override void TestRareVectors()
+        {
+            base.TestRareVectors();
+        }
+
+        [Test]
+        public override void TestHighFreqs()
+        {
+            base.TestHighFreqs();
+        }
+
+        [Test]
+        public override void TestLotsOfFields()
+        {
+            base.TestLotsOfFields();
+        }
+
+        [Test, Timeout(300000)]
+        // different options for the same field
+        public override void TestMixedOptions()
+        {
+            base.TestMixedOptions();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestMerge()
+        {
+            base.TestMerge();
+        }
+
+        [Test]
+        // run random tests from different threads to make sure the per-thread clones
+        // don't share mutable data
+        public override void TestClone()
+        {
+            base.TestClone();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
index 9ee39e7..3686767 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40DocValuesFormat.cs
@@ -50,5 +50,506 @@ namespace Lucene.Net.Codecs.Lucene40
         {
             return false;
         }
+
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs
index c7f7f07..0d3666d 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40PostingsFormat.cs
@@ -44,5 +44,68 @@ namespace Lucene.Net.Codecs.Lucene40
                 return new Lucene40RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE);
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
index 4e57234..4e3bebf 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40StoredFieldsFormat.cs
@@ -41,5 +41,94 @@ namespace Lucene.Net.Codecs.Lucene40
                 return new Lucene40RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE);
             }
         }
+
+
+        #region BaseStoredFieldsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestRandomStoredFields()
+        {
+            base.TestRandomStoredFields();
+        }
+
+        [Test]
+        // LUCENE-1727: make sure doc fields are stored in order
+        public override void TestStoredFieldsOrder()
+        {
+            base.TestStoredFieldsOrder();
+        }
+
+        [Test]
+        // LUCENE-1219
+        public override void TestBinaryFieldOffsetLength()
+        {
+            base.TestBinaryFieldOffsetLength();
+        }
+
+        [Test]
+        public override void TestNumericField()
+        {
+            base.TestNumericField();
+        }
+
+        [Test]
+        public override void TestIndexedBit()
+        {
+            base.TestIndexedBit();
+        }
+
+        [Test]
+        public override void TestReadSkip()
+        {
+            base.TestReadSkip();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestEmptyDocs()
+        {
+            base.TestEmptyDocs();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestConcurrentReads()
+        {
+            base.TestConcurrentReads();
+        }
+
+        [Test]
+        public override void TestWriteReadMerge()
+        {
+            base.TestWriteReadMerge();
+        }
+
+        [Test, Timeout(80000)]
+        public override void TestBigDocuments()
+        {
+            base.TestBigDocuments();
+        }
+
+        [Test]
+        public override void TestBulkMergeWithDeletes()
+        {
+            base.TestBulkMergeWithDeletes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
index 342d7ce..9a6e544 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene40/TestLucene40TermVectorsFormat.cs
@@ -41,5 +41,72 @@ namespace Lucene.Net.Codecs.Lucene40
                 return new Lucene40RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE);
             }
         }
+
+
+        #region BaseTermVectorsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        // only one doc with vectors
+        public override void TestRareVectors()
+        {
+            base.TestRareVectors();
+        }
+
+        [Test]
+        public override void TestHighFreqs()
+        {
+            base.TestHighFreqs();
+        }
+
+        [Test]
+        public override void TestLotsOfFields()
+        {
+            base.TestLotsOfFields();
+        }
+
+        [Test, Timeout(300000)]
+        // different options for the same field
+        public override void TestMixedOptions()
+        {
+            base.TestMixedOptions();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestMerge()
+        {
+            base.TestMerge();
+        }
+
+        [Test]
+        // run random tests from different threads to make sure the per-thread clones
+        // don't share mutable data
+        public override void TestClone()
+        {
+            base.TestClone();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs
index 201eaf6..fb309a5 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Codecs.Lucene41
 {
     /*
@@ -34,5 +36,68 @@ namespace Lucene.Net.Codecs.Lucene41
                 return Codec_Renamed;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
index 4259478..bcd5a49 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestLucene41StoredFieldsFormat.cs
@@ -40,5 +40,94 @@ namespace Lucene.Net.Codecs.Lucene41
                 return new Lucene41RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE);
             }
         }
+
+
+        #region BaseStoredFieldsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestRandomStoredFields()
+        {
+            base.TestRandomStoredFields();
+        }
+
+        [Test]
+        // LUCENE-1727: make sure doc fields are stored in order
+        public override void TestStoredFieldsOrder()
+        {
+            base.TestStoredFieldsOrder();
+        }
+
+        [Test]
+        // LUCENE-1219
+        public override void TestBinaryFieldOffsetLength()
+        {
+            base.TestBinaryFieldOffsetLength();
+        }
+
+        [Test]
+        public override void TestNumericField()
+        {
+            base.TestNumericField();
+        }
+
+        [Test]
+        public override void TestIndexedBit()
+        {
+            base.TestIndexedBit();
+        }
+
+        [Test]
+        public override void TestReadSkip()
+        {
+            base.TestReadSkip();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestEmptyDocs()
+        {
+            base.TestEmptyDocs();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestConcurrentReads()
+        {
+            base.TestConcurrentReads();
+        }
+
+        [Test]
+        public override void TestWriteReadMerge()
+        {
+            base.TestWriteReadMerge();
+        }
+
+        [Test, Timeout(120000)]
+        public override void TestBigDocuments()
+        {
+            base.TestBigDocuments();
+        }
+
+        [Test]
+        public override void TestBulkMergeWithDeletes()
+        {
+            base.TestBulkMergeWithDeletes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
index 7f4438b..598f373 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene42/TestLucene42DocValuesFormat.cs
@@ -51,5 +51,531 @@ namespace Lucene.Net.Codecs.Lucene42
         {
             return false;
         }
+
+
+        #region BaseCompressingDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestUniqueValuesCompression()
+        {
+            base.TestUniqueValuesCompression();
+        }
+
+        [Test]
+        public override void TestDateCompression()
+        {
+            base.TestDateCompression();
+        }
+
+        [Test]
+        public override void TestSingleBigValueCompression()
+        {
+            base.TestSingleBigValueCompression();
+        }
+
+        #endregion
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs
index 2ce76f3..dc18580 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene45/TestLucene45DocValuesFormat.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Codecs.Lucene45
 {
     /*
@@ -34,5 +36,530 @@ namespace Lucene.Net.Codecs.Lucene45
                 return Codec_Renamed;
             }
         }
+
+        #region BaseCompressingDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestUniqueValuesCompression()
+        {
+            base.TestUniqueValuesCompression();
+        }
+
+        [Test]
+        public override void TestDateCompression()
+        {
+            base.TestDateCompression();
+        }
+
+        [Test]
+        public override void TestSingleBigValueCompression()
+        {
+            base.TestSingleBigValueCompression();
+        }
+
+        #endregion
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file


[04/47] lucenenet git commit: Fixed bug in Core.Index.IndexWriter - shouldn't be calling WriteLock.Release() here.

Posted by ni...@apache.org.
Fixed bug in Core.Index.IndexWriter - shouldn't be calling WriteLock.Release() here.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/4ec42c4b
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/4ec42c4b
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/4ec42c4b

Branch: refs/heads/master
Commit: 4ec42c4b56a8882e8718650502a75a37992409ba
Parents: e9f1d92
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Thu Oct 6 23:11:56 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 6 23:11:56 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Index/IndexWriter.cs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4ec42c4b/src/Lucene.Net.Core/Index/IndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/IndexWriter.cs b/src/Lucene.Net.Core/Index/IndexWriter.cs
index 2c759e0..85160bc 100644
--- a/src/Lucene.Net.Core/Index/IndexWriter.cs
+++ b/src/Lucene.Net.Core/Index/IndexWriter.cs
@@ -1266,8 +1266,7 @@ namespace Lucene.Net.Index
 
                 if (WriteLock != null)
                 {
-                    WriteLock.Release(); // release write lock
-                    WriteLock.Dispose();
+                    WriteLock.Dispose(); // release write lock
                     WriteLock = null;
                 }
                 lock (this)


[02/47] lucenenet git commit: Fixed bug in Core.Index.TestDuelingCodecs - was using wrong codec for testing, it should be SimpleText, not Lucene41.

Posted by ni...@apache.org.
Fixed bug in Core.Index.TestDuelingCodecs - was using wrong codec for testing, it should be SimpleText, not Lucene41.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/71ff7eee
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/71ff7eee
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/71ff7eee

Branch: refs/heads/master
Commit: 71ff7eee6d794c492bd3471a0065454bcbd94d3d
Parents: ddfb46c
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 4 18:51:14 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 6 16:39:41 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71ff7eee/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs b/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs
index 1c7fc47..624708a 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDuelingCodecs.cs
@@ -58,7 +58,7 @@ namespace Lucene.Net.Index
             // as this gives the best overall coverage. when we have more
             // codecs we should probably pick 2 from Codec.availableCodecs()
 
-            LeftCodec = Codec.ForName("Lucene41");
+            LeftCodec = Codec.ForName("SimpleText");
             RightCodec = new RandomCodec(Random());
 
             LeftDir = NewDirectory();


[18/47] lucenenet git commit: Added Codecs.BlockTerms tests to the project

Posted by ni...@apache.org.
Added Codecs.BlockTerms tests to the project


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/4524df49
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/4524df49
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/4524df49

Branch: refs/heads/master
Commit: 4524df4933c381e91bbad99ada80235556b7f11f
Parents: c4bd905
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 10 23:51:42 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:21 2016 +0700

----------------------------------------------------------------------
 .../BlockTerms/TestFixedGapPostingsFormat.cs    | 47 ++++++++++----------
 .../Lucene.Net.Tests.Codecs.csproj              |  1 +
 2 files changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4524df49/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
index 11aa1b8..a66f96c 100644
--- a/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
@@ -1,7 +1,11 @@
-\ufeffnamespace org.apache.lucene.codecs.blockterms
-{
+\ufeffusing Lucene.Net.Codecs.Lucene41Ords;
+using Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.BlockTerms
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,26 +22,21 @@
 	 * limitations under the License.
 	 */
 
-	using Lucene41WithOrds = org.apache.lucene.codecs.lucene41ords.Lucene41WithOrds;
-	using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Basic tests of a PF using FixedGap terms dictionary
-	/// </summary>
-	// TODO: we should add an instantiation for VarGap too to TestFramework, and a test in this package
-	// TODO: ensure both of these are also in rotation in RandomCodec
-	public class TestFixedGapPostingsFormat : BasePostingsFormatTestCase
-	{
-	  private readonly Codec codec = TestUtil.alwaysPostingsFormat(new Lucene41WithOrds());
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Basic tests of a PF using FixedGap terms dictionary
+    /// </summary>
+    // TODO: we should add an instantiation for VarGap too to TestFramework, and a test in this package
+    // TODO: ensure both of these are also in rotation in RandomCodec
+    public class TestFixedGapPostingsFormat : BasePostingsFormatTestCase
+    {
+        private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new Lucene41WithOrds());
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4524df49/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
index 991be3c..90e9d38 100644
--- a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
+++ b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
@@ -42,6 +42,7 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="BlockTerms\TestFixedGapPostingsFormat.cs" />
     <Compile Include="DiskDv\TestDiskDocValuesFormat.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="SimpleText\TestSimpleTextDocValuesFormat.cs" />


[26/47] lucenenet git commit: Added Codecs.Memory tests to the project

Posted by ni...@apache.org.
Added Codecs.Memory tests to the project


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/d7dca527
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/d7dca527
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/d7dca527

Branch: refs/heads/master
Commit: d7dca5273328d205c204a0bf4efa718396a28698
Parents: b00ad49
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 00:19:27 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:24 2016 +0700

----------------------------------------------------------------------
 .../Lucene.Net.Tests.Codecs.csproj              |  8 ++++
 .../Memory/TestDirectDocValuesFormat.cs         | 41 ++++++++--------
 .../Memory/TestDirectPostingsFormat.cs          | 44 +++++++++---------
 .../Memory/TestFSTOrdPostingsFormat.cs          | 41 ++++++++--------
 .../Memory/TestFSTOrdPulsing41PostingsFormat.cs | 41 ++++++++--------
 .../Memory/TestFSTPostingsFormat.cs             | 41 ++++++++--------
 .../Memory/TestFSTPulsing41PostingsFormat.cs    | 41 ++++++++--------
 .../Memory/TestMemoryDocValuesFormat.cs         | 49 ++++++++++----------
 .../Memory/TestMemoryPostingsFormat.cs          | 44 +++++++++---------
 9 files changed, 174 insertions(+), 176 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
index ec557a4..9a32f6c 100644
--- a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
+++ b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
@@ -48,6 +48,14 @@
     <Compile Include="IntBlock\TestFixedIntBlockPostingsFormat.cs" />
     <Compile Include="IntBlock\TestIntBlockCodec.cs" />
     <Compile Include="IntBlock\TestVariableIntBlockPostingsFormat.cs" />
+    <Compile Include="Memory\TestDirectDocValuesFormat.cs" />
+    <Compile Include="Memory\TestDirectPostingsFormat.cs" />
+    <Compile Include="Memory\TestFSTOrdPostingsFormat.cs" />
+    <Compile Include="Memory\TestFSTOrdPulsing41PostingsFormat.cs" />
+    <Compile Include="Memory\TestFSTPostingsFormat.cs" />
+    <Compile Include="Memory\TestFSTPulsing41PostingsFormat.cs" />
+    <Compile Include="Memory\TestMemoryDocValuesFormat.cs" />
+    <Compile Include="Memory\TestMemoryPostingsFormat.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Pulsing\Test10KPulsings.cs" />
     <Compile Include="Pulsing\TestPulsingPostingsFormat.cs" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
index e05827e..ace0574 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.Memory
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,23 +21,19 @@
 	 * limitations under the License.
 	 */
 
-	using BaseDocValuesFormatTestCase = org.apache.lucene.index.BaseDocValuesFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Tests DirectDocValuesFormat
-	/// </summary>
-	public class TestDirectDocValuesFormat : BaseDocValuesFormatTestCase
-	{
-	  private readonly Codec codec = TestUtil.alwaysDocValuesFormat(new DirectDocValuesFormat());
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Tests DirectDocValuesFormat
+    /// </summary>
+    public class TestDirectDocValuesFormat : BaseDocValuesFormatTestCase
+    {
+        private readonly Codec codec = TestUtil.AlwaysDocValuesFormat(new DirectDocValuesFormat());
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
index 96a04cb..990e29c 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.Memory
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,25 +21,20 @@
 	 * limitations under the License.
 	 */
 
-	using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Tests DirectPostingsFormat
-	/// </summary>
-	public class TestDirectPostingsFormat : BasePostingsFormatTestCase
-	{
-	  // TODO: randomize parameters
-	  private readonly Codec codec = TestUtil.alwaysPostingsFormat(new DirectPostingsFormat());
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Tests DirectPostingsFormat
+    /// </summary>
+    public class TestDirectPostingsFormat : BasePostingsFormatTestCase
+    {
+        // TODO: randomize parameters
+        private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new DirectPostingsFormat());
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
index cc5afb0..6f30a01 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.Memory
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,23 +21,19 @@
 	 * limitations under the License.
 	 */
 
-	using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Tests FSTOrdPostingsFormat 
-	/// </summary>
-	public class TestFSTOrdPostingsFormat : BasePostingsFormatTestCase
-	{
-	  private readonly Codec codec = TestUtil.alwaysPostingsFormat(new FSTOrdPostingsFormat());
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Tests FSTOrdPostingsFormat 
+    /// </summary>
+    public class TestFSTOrdPostingsFormat : BasePostingsFormatTestCase
+    {
+        private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new FSTOrdPostingsFormat());
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
index a963c73..ddb99c6 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.Memory
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,23 +21,19 @@
 	 * limitations under the License.
 	 */
 
-	using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Tests FSTOrdPulsing41PostingsFormat 
-	/// </summary>
-	public class TestFSTOrdPulsing41PostingsFormat : BasePostingsFormatTestCase
-	{
-	  private readonly Codec codec = TestUtil.alwaysPostingsFormat(new FSTOrdPulsing41PostingsFormat());
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Tests FSTOrdPulsing41PostingsFormat 
+    /// </summary>
+    public class TestFSTOrdPulsing41PostingsFormat : BasePostingsFormatTestCase
+    {
+        private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new FSTOrdPulsing41PostingsFormat());
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
index 261b41f..cac7e77 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.Memory
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,23 +21,19 @@
 	 * limitations under the License.
 	 */
 
-	using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Tests FSTPostingsFormat 
-	/// </summary>
-	public class TestFSTPostingsFormat : BasePostingsFormatTestCase
-	{
-	  private readonly Codec codec = TestUtil.alwaysPostingsFormat(new FSTPostingsFormat());
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Tests FSTPostingsFormat 
+    /// </summary>
+    public class TestFSTPostingsFormat : BasePostingsFormatTestCase
+    {
+        private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new FSTPostingsFormat());
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
index f1daa94..e9beed4 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.Memory
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,23 +21,19 @@
 	 * limitations under the License.
 	 */
 
-	using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Tests FSTPulsing41PostingsFormat 
-	/// </summary>
-	public class TestFSTPulsing41PostingsFormat : BasePostingsFormatTestCase
-	{
-	  private readonly Codec codec = TestUtil.alwaysPostingsFormat(new FSTPulsing41PostingsFormat());
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Tests FSTPulsing41PostingsFormat 
+    /// </summary>
+    public class TestFSTPulsing41PostingsFormat : BasePostingsFormatTestCase
+    {
+        private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new FSTPulsing41PostingsFormat());
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
index f1f78c3..4f65807 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.Memory
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,28 +21,24 @@
 	 * limitations under the License.
 	 */
 
-	using BaseCompressingDocValuesFormatTestCase = org.apache.lucene.index.BaseCompressingDocValuesFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Tests MemoryDocValuesFormat
-	/// </summary>
-	public class TestMemoryDocValuesFormat : BaseCompressingDocValuesFormatTestCase
-	{
-	  private readonly Codec codec = TestUtil.alwaysDocValuesFormat(new MemoryDocValuesFormat());
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
+    /// <summary>
+    /// Tests MemoryDocValuesFormat
+    /// </summary>
+    public class TestMemoryDocValuesFormat : BaseCompressingDocValuesFormatTestCase
+    {
+        private readonly Codec codec = TestUtil.AlwaysDocValuesFormat(new MemoryDocValuesFormat());
 
-	  protected internal override bool codecAcceptsHugeBinaryValues(string field)
-	  {
-		return false;
-	  }
-	}
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
 
+        protected override bool CodecAcceptsHugeBinaryValues(string field)
+        {
+            return false;
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
index 62da9a8..938ae52 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.Memory
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,25 +21,20 @@
 	 * limitations under the License.
 	 */
 
-	using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Tests MemoryPostingsFormat
-	/// </summary>
-	public class TestMemoryPostingsFormat : BasePostingsFormatTestCase
-	{
-	  // TODO: randomize doPack
-	  private readonly Codec codec = TestUtil.alwaysPostingsFormat(new MemoryPostingsFormat());
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Tests MemoryPostingsFormat
+    /// </summary>
+    public class TestMemoryPostingsFormat : BasePostingsFormatTestCase
+    {
+        // TODO: randomize doPack
+        private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new MemoryPostingsFormat());
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file


[21/47] lucenenet git commit: Reverted Codecs.IntBlock API back to its original form

Posted by ni...@apache.org.
Reverted Codecs.IntBlock API back to its original form


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/4137444b
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/4137444b
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/4137444b

Branch: refs/heads/master
Commit: 4137444b2d5a74e7df9c5fa1117d9458279accdd
Parents: b5259f4
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 00:06:20 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:22 2016 +0700

----------------------------------------------------------------------
 .../Intblock/FixedIntBlockIndexInput.cs         | 189 +++++++++++++---
 .../Intblock/FixedIntBlockIndexOutput.cs        | 131 +++++++++---
 src/Lucene.Net.Codecs/Intblock/IBlockReader.cs  |  31 ---
 .../Intblock/IntBlockIndexInput.cs              |  84 --------
 .../Intblock/IntBlockIndexOutput.cs             |  85 --------
 .../Intblock/IntBlockIndexReader.cs             | 100 ---------
 .../Intblock/VariableIntBlockIndexInput.cs      | 213 ++++++++++++++++---
 .../Intblock/VariableIntBlockIndexOutput.cs     | 132 ++++++++----
 src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj  |  12 +-
 9 files changed, 535 insertions(+), 442 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4137444b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
index f992c77..f4e629c 100644
--- a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
@@ -1,26 +1,25 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.Intblock
-{
+\ufeffusing Lucene.Net.Codecs.Sep;
+using Lucene.Net.Store;
+using System.Diagnostics;
 
-    using Sep;
-    using IntIndexInput = Sep.IntIndexInput;
-    using IndexInput = Store.IndexInput;
+namespace Lucene.Net.Codecs.IntBlock
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Naive int block API that writes vInts.  This is
@@ -40,35 +39,161 @@ namespace Lucene.Net.Codecs.Intblock
     public abstract class FixedIntBlockIndexInput : IntIndexInput
     {
 
-        private readonly IndexInput _input;
-        protected internal readonly int BLOCK_SIZE;
+        private readonly IndexInput input;
+        protected internal readonly int blockSize;
 
         public FixedIntBlockIndexInput(IndexInput @in)
         {
-            _input = @in;
-            BLOCK_SIZE = @in.ReadVInt();
+            input = @in;
+            blockSize = @in.ReadVInt();
         }
 
         public override IntIndexInputReader Reader()
         {
-            var buffer = new int[BLOCK_SIZE];
-            var clone = (IndexInput) _input.Clone();
+            var buffer = new int[blockSize];
+            var clone = (IndexInput)input.Clone();
             // TODO: can this be simplified?
-            return new IntBlockIndexReader(clone, buffer, GetBlockReader(clone, buffer));
+            return new InputReader(clone, buffer, GetBlockReader(clone, buffer));
         }
 
         public override void Dispose()
         {
-            _input.Dispose();
+            input.Dispose();
         }
 
         public override IntIndexInputIndex Index()
         {
-            return new IntBlockIndexInput(this);
+            return new InputIndex(this);
         }
 
         protected internal abstract IBlockReader GetBlockReader(IndexInput @in, int[] buffer);
 
-    }
 
+        /// <summary>
+        /// Interface for fixed-size block decoders.
+        /// <para>
+        /// Implementations should decode into the buffer in <see cref="ReadBlock()"/>.
+        /// </para>
+        /// </summary>
+        public interface IBlockReader
+        {
+            void ReadBlock();
+        }
+
+        private class InputReader : IntIndexInputReader
+        {
+            private readonly IndexInput input;
+            private readonly IBlockReader blockReader;
+            private readonly int blockSize;
+            private readonly int[] pending;
+
+            private int upto;
+            private bool seekPending;
+            private long pendingFP;
+            private long lastBlockFP = -1;
+
+            public InputReader(IndexInput input, int[] pending, IBlockReader blockReader)
+            {
+                this.input = input;
+                this.pending = pending;
+                this.blockSize = pending.Length;
+                this.blockReader = blockReader;
+                upto = blockSize;
+            }
+
+            internal void Seek(long fp, int upto)
+            {
+                Debug.Assert(upto < blockSize);
+                if (seekPending || fp != lastBlockFP)
+                {
+                    pendingFP = fp;
+                    seekPending = true;
+                }
+                this.upto = upto;
+            }
+
+            public override int Next()
+            {
+                if (seekPending)
+                {
+                    // Seek & load new block
+                    input.Seek(pendingFP);
+                    lastBlockFP = pendingFP;
+                    blockReader.ReadBlock();
+                    seekPending = false;
+                }
+                else if (upto == blockSize)
+                {
+                    // Load new block
+                    lastBlockFP = input.FilePointer;
+                    blockReader.ReadBlock();
+                    upto = 0;
+                }
+                return pending[upto++];
+            }
+        }
+
+        private class InputIndex : IntIndexInputIndex
+        {
+            private readonly FixedIntBlockIndexInput outerInstance;
+
+            public InputIndex(FixedIntBlockIndexInput outerInstance)
+            {
+                this.outerInstance = outerInstance;
+            }
+
+            private long fp;
+            private int upto;
+
+            public override void Read(DataInput indexIn, bool absolute)
+            {
+                if (absolute)
+                {
+                    upto = indexIn.ReadVInt();
+                    fp = indexIn.ReadVLong();
+                }
+                else
+                {
+                    int uptoDelta = indexIn.ReadVInt();
+                    if ((uptoDelta & 1) == 1)
+                    {
+                        // same block
+                        upto += (int)((uint)uptoDelta >> 1);
+                    }
+                    else
+                    {
+                        // new block
+                        upto = (int)((uint)uptoDelta >> 1);
+                        fp += indexIn.ReadVLong();
+                    }
+                }
+                Debug.Assert(upto < outerInstance.blockSize);
+            }
+
+            public override void Seek(IntIndexInputReader other)
+            {
+                ((InputReader)other).Seek(fp, upto);
+            }
+
+            public override void CopyFrom(IntIndexInputIndex other)
+            {
+                InputIndex idx = (InputIndex)other;
+                fp = idx.fp;
+                upto = idx.upto;
+            }
+
+            public override IntIndexInputIndex Clone()
+            {
+                InputIndex other = new InputIndex(outerInstance);
+                other.fp = fp;
+                other.upto = upto;
+                return other;
+            }
+
+            public override string ToString()
+            {
+                return "fp=" + fp + " upto=" + upto;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4137444b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
index 96d08d1..b98f92d 100644
--- a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
@@ -1,25 +1,25 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.Intblock
+\ufeffusing Lucene.Net.Codecs.Sep;
+using Lucene.Net.Store;
+using System.Diagnostics;
+
+namespace Lucene.Net.Codecs.IntBlock
 {
-    using Sep;
-    using IntIndexOutput = Sep.IntIndexOutput;
-    using IndexOutput = Store.IndexOutput;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Naive int block API that writes vInts.  This is
@@ -39,31 +39,95 @@ namespace Lucene.Net.Codecs.Intblock
     /// </summary>
     public abstract class FixedIntBlockIndexOutput : IntIndexOutput
     {
-        private readonly int _blockSize;
-        protected internal readonly int[] BUFFER;
+        protected readonly IndexOutput output;
+        private readonly int blockSize;
+        protected readonly int[] buffer;
+        private int upto;
 
         protected internal FixedIntBlockIndexOutput(IndexOutput output, int fixedBlockSize)
         {
-            _blockSize = fixedBlockSize;
-            OUTPUT = output;
-            output.WriteVInt(_blockSize);
-            BUFFER = new int[_blockSize];
+            blockSize = fixedBlockSize;
+            this.output = output;
+            output.WriteVInt(blockSize);
+            buffer = new int[blockSize];
         }
 
         protected internal abstract void FlushBlock();
 
         public override IntIndexOutputIndex Index()
         {
-            return new IntBlockIndexOuput(this);
+            return new OutputIndex(this);
+        }
+
+        private class OutputIndex : IntIndexOutputIndex
+        {
+            private readonly FixedIntBlockIndexOutput outerInstance;
+
+            public OutputIndex(FixedIntBlockIndexOutput outerInstance)
+            {
+                this.outerInstance = outerInstance;
+            }
+
+            internal long fp;
+            internal int upto;
+            internal long lastFP;
+            internal int lastUpto;
+
+            public override void Mark()
+            {
+                fp = outerInstance.output.FilePointer;
+                upto = outerInstance.upto;
+            }
+
+            public override void CopyFrom(IntIndexOutputIndex other, bool copyLast)
+            {
+                OutputIndex idx = (OutputIndex)other;
+                fp = idx.fp;
+                upto = idx.upto;
+                if (copyLast)
+                {
+                    lastFP = fp;
+                    lastUpto = upto;
+                }
+            }
+
+            public override void Write(DataOutput indexOut, bool absolute)
+            {
+                if (absolute)
+                {
+                    indexOut.WriteVInt(upto);
+                    indexOut.WriteVLong(fp);
+                }
+                else if (fp == lastFP)
+                {
+                    // same block
+                    Debug.Assert(upto >= lastUpto);
+                    int uptoDelta = upto - lastUpto;
+                    indexOut.WriteVInt(uptoDelta << 1 | 1);
+                }
+                else
+                {
+                    // new block
+                    indexOut.WriteVInt(upto << 1);
+                    indexOut.WriteVLong(fp - lastFP);
+                }
+                lastUpto = upto;
+                lastFP = fp;
+            }
+
+            public override string ToString()
+            {
+                return "fp=" + fp + " upto=" + upto;
+            }
         }
 
         public override void Write(int v)
         {
-            BUFFER[_upto++] = v;
-            if (_upto == _blockSize)
+            buffer[upto++] = v;
+            if (upto == blockSize)
             {
                 FlushBlock();
-                _upto = 0;
+                upto = 0;
             }
         }
 
@@ -71,7 +135,7 @@ namespace Lucene.Net.Codecs.Intblock
         {
             try
             {
-                if (_upto > 0)
+                if (upto > 0)
                 {
                     // NOTE: entries in the block after current upto are
                     // invalid
@@ -80,9 +144,8 @@ namespace Lucene.Net.Codecs.Intblock
             }
             finally
             {
-                OUTPUT.Dispose();
+                output.Dispose();
             }
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4137444b/src/Lucene.Net.Codecs/Intblock/IBlockReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/IBlockReader.cs b/src/Lucene.Net.Codecs/Intblock/IBlockReader.cs
deleted file mode 100644
index 6218502..0000000
--- a/src/Lucene.Net.Codecs/Intblock/IBlockReader.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.Intblock
-{
-    /// <summary>
-    /// Interface for variable-size block decoders.
-    /// <para>
-    /// Implementations should decode into the buffer in <seealso cref="#readBlock"/>.
-    /// </para>
-    /// </summary>
-    public interface IBlockReader
-    {
-        int ReadBlock();
-        void Seek(long pos);
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4137444b/src/Lucene.Net.Codecs/Intblock/IntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/IntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/IntBlockIndexInput.cs
deleted file mode 100644
index 0e3e67f..0000000
--- a/src/Lucene.Net.Codecs/Intblock/IntBlockIndexInput.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.Intblock
-{
-    using Sep;
-    using Store;
-
-    internal class IntBlockIndexInput : IntIndexInputIndex
-    {
-        private readonly IntIndexInput _outerInstance;
-        private long _fp;
-        private int _upto;
-
-        public IntBlockIndexInput(IntIndexInput outerInstance)
-        {
-            _outerInstance = outerInstance;
-        }
-
-        public override void Read(DataInput indexIn, bool absolute)
-        {
-            if (absolute)
-            {
-                _upto = indexIn.ReadVInt();
-                _fp = indexIn.ReadVLong();
-            }
-            else
-            {
-                int uptoDelta = indexIn.ReadVInt();
-                if ((uptoDelta & 1) == 1)
-                {
-                    // same block
-                    _upto += (int) ((uint) uptoDelta >> 1);
-                }
-                else
-                {
-                    // new block
-                    _upto = (int) ((uint) uptoDelta >> 1);
-                    _fp += indexIn.ReadVLong();
-                }
-            }
-            // TODO: we can't do this assert because non-causal
-            // int encoders can have upto over the buffer size
-            //assert upto < maxBlockSize: "upto=" + upto + " max=" + maxBlockSize;
-        }
-
-        public override string ToString()
-        {
-            return "VarIntBlock.Index fp=" + _fp + " upto=" + _upto;
-        }
-
-        public override void Seek(IntIndexInputReader other)
-        {
-            ((IntBlockIndexReader)other).Seek(_fp, _upto);
-        }
-
-        public override void CopyFrom(IntIndexInputIndex other)
-        {
-            var idx = (IntBlockIndexInput)other;
-            _fp = idx._fp;
-            _upto = idx._upto;
-        }
-
-        public override IntIndexInputIndex Clone()
-        {
-            var other = new IntBlockIndexInput(_outerInstance) {_fp = _fp, _upto = _upto};
-            return other;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4137444b/src/Lucene.Net.Codecs/Intblock/IntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/IntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/Intblock/IntBlockIndexOutput.cs
deleted file mode 100644
index b5cec95..0000000
--- a/src/Lucene.Net.Codecs/Intblock/IntBlockIndexOutput.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.Intblock
-{
-    using Sep;
-    using Store;
-    using System.Diagnostics;
-
-    internal class IntBlockIndexOuput : IntIndexOutputIndex
-    {
-        private readonly IntIndexOutput _outerInstance;
-        private long _fp;
-        private int _upto;
-        private long _lastFp;
-        private int _lastUpto;
-
-        public IntBlockIndexOuput(IntIndexOutput outerInstance)
-        {
-            _outerInstance = outerInstance;
-        }
-
-        public override void Mark()
-        {
-            _fp = _outerInstance.OUTPUT.FilePointer;
-            _upto = _outerInstance._upto;
-        }
-
-        public override void CopyFrom(IntIndexOutputIndex other, bool copyLast)
-        {
-            var idx = (IntBlockIndexOuput)other;
-            _fp = idx._fp;
-            _upto = idx._upto;
-            if (copyLast)
-            {
-                _lastFp = _fp;
-                _lastUpto = _upto;
-            }
-        }
-
-        public override void Write(DataOutput indexOut, bool absolute)
-        {
-            Debug.Assert(_upto >= 0);
-            if (absolute)
-            {
-                indexOut.WriteVInt(_upto);
-                indexOut.WriteVLong(_fp);
-            }
-            else if (_fp == _lastFp)
-            {
-                // same block
-                Debug.Assert(_upto >= _lastUpto);
-                var uptoDelta = _upto - _lastUpto;
-                indexOut.WriteVInt(uptoDelta << 1 | 1);
-            }
-            else
-            {
-                // new block
-                indexOut.WriteVInt(_upto << 1);
-                indexOut.WriteVLong(_fp - _lastFp);
-            }
-            _lastUpto = _upto;
-            _lastFp = _fp;
-        }
-
-        public override string ToString()
-        {
-            return "fp=" + _fp + " upto=" + _upto;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4137444b/src/Lucene.Net.Codecs/Intblock/IntBlockIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/IntBlockIndexReader.cs b/src/Lucene.Net.Codecs/Intblock/IntBlockIndexReader.cs
deleted file mode 100644
index 22a4aa7..0000000
--- a/src/Lucene.Net.Codecs/Intblock/IntBlockIndexReader.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.Intblock
-{
-    using Sep;
-    using Store;
-    using System.Diagnostics;
-
-    internal class IntBlockIndexReader : IntIndexInputReader
-    {
-        private readonly IndexInput _input;
-
-        public readonly int[] PENDING;
-        private int _upto;
-
-        private bool _seekPending;
-        private long _pendingFp;
-        private int _pendingUpto;
-        private long _lastBlockFp;
-        private int _blockSize;
-        private readonly IBlockReader _blockReader;
-
-        public IntBlockIndexReader(IndexInput input, int[] pending, IBlockReader blockReader)
-        {
-            _input = input;
-            PENDING = pending;
-            _blockReader = blockReader;
-            _blockSize = pending.Length;
-            _upto = _blockSize;
-        }
-
-        internal virtual void Seek(long fp, int upto)
-        {
-            // TODO: should we do this in real-time, not lazy?
-            _pendingFp = fp;
-            _pendingUpto = upto;
-            Debug.Assert(_pendingUpto >= 0, "pendingUpto=" + _pendingUpto);
-            _seekPending = true;
-        }
-
-        internal void MaybeSeek()
-        {
-            if (!_seekPending) return;
-
-            if (_pendingFp != _lastBlockFp)
-            {
-                // need new block
-                _input.Seek(_pendingFp);
-                _lastBlockFp = _pendingFp;
-                _blockReader.Seek(_pendingFp);
-                _blockSize = _blockReader.ReadBlock();
-            }
-            _upto = _pendingUpto;
-
-            // TODO: if we were more clever when writing the
-            // index, such that a seek point wouldn't be written
-            // until the int encoder "committed", we could avoid
-            // this (likely minor) inefficiency:
-
-            // This is necessary for int encoders that are
-            // non-causal, ie must see future int values to
-            // encode the current ones.
-            while (_upto >= _blockSize)
-            {
-                _upto -= _blockSize;
-                _lastBlockFp = _input.FilePointer;
-                _blockSize = _blockReader.ReadBlock();
-            }
-            _seekPending = false;
-        }
-
-        public override int Next()
-        {
-            MaybeSeek();
-            if (_upto == _blockSize)
-            {
-                _lastBlockFp = _input.FilePointer;
-                _blockSize = _blockReader.ReadBlock();
-                _upto = 0;
-            }
-
-            return PENDING[_upto++];
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4137444b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
index 2ed4c47..f3d4b2f 100644
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
@@ -1,25 +1,25 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.Intblock
+\ufeffusing Lucene.Net.Codecs.Sep;
+using Lucene.Net.Store;
+using System.Diagnostics;
+
+namespace Lucene.Net.Codecs.IntBlock
 {
-    using Sep;
-    using IntIndexInput = Sep.IntIndexInput;
-    using IndexInput = Store.IndexInput;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Naive int block API that writes vInts.  This is
@@ -40,35 +40,186 @@ namespace Lucene.Net.Codecs.Intblock
     /// </summary>
     public abstract class VariableIntBlockIndexInput : IntIndexInput
     {
-        private readonly IndexInput _input;
-        protected internal readonly int MAX_BLOCK_SIZE;
+        private readonly IndexInput input;
+        protected internal readonly int maxBlockSize;
 
         protected internal VariableIntBlockIndexInput(IndexInput input)
         {
-            _input = input;
-            MAX_BLOCK_SIZE = input.ReadInt();
+            this.input = input;
+            maxBlockSize = input.ReadInt();
         }
 
         public override IntIndexInputReader Reader()
         {
-            var buffer = new int[MAX_BLOCK_SIZE];
-            var clone = (IndexInput)_input.Clone();
+            var buffer = new int[maxBlockSize];
+            var clone = (IndexInput)input.Clone();
             // TODO: can this be simplified?
-            return new IntBlockIndexReader(clone, buffer, GetBlockReader(clone, buffer));
+            return new InputReader(clone, buffer, GetBlockReader(clone, buffer));
         }
 
         public override void Dispose()
         {
-            _input.Dispose();
+            input.Dispose();
         }
 
         public override IntIndexInputIndex Index()
         {
-            return new IntBlockIndexInput(this);
+            return new InputIndex(this);
         }
 
         protected internal abstract IBlockReader GetBlockReader(IndexInput @in, int[] buffer);
 
-    }
+        /// <summary>
+        /// Interface for variable-size block decoders.
+        /// <para>
+        /// Implementations should decode into the buffer in <see cref="ReadBlock()"/>.
+        /// </para>
+        /// </summary>
+        public interface IBlockReader
+        {
+            int ReadBlock();
+            void Seek(long pos);
+        }
+
+        private class InputReader : IntIndexInputReader
+        {
+            private readonly IndexInput input;
+
+            public readonly int[] pending;
+            private int upto;
+
+            private bool seekPending;
+            private long pendingFP;
+            private int pendingUpto;
+            private long lastBlockFP;
+            private int blockSize;
+            private readonly IBlockReader blockReader;
+
+            public InputReader(IndexInput input, int[] pending, IBlockReader blockReader)
+            {
+                this.input = input;
+                this.pending = pending;
+                this.blockReader = blockReader;
+            }
+
+            internal void Seek(long fp, int upto)
+            {
+                // TODO: should we do this in real-time, not lazy?
+                pendingFP = fp;
+                pendingUpto = upto;
+                Debug.Assert(pendingUpto >= 0, "pendingUpto=" + pendingUpto);
+                seekPending = true;
+            }
+
+            private void MaybeSeek()
+            {
+                if (seekPending)
+                {
+                    if (pendingFP != lastBlockFP)
+                    {
+                        // need new block
+                        input.Seek(pendingFP);
+                        blockReader.Seek(pendingFP);
+                        lastBlockFP = pendingFP;
+                        blockSize = blockReader.ReadBlock();
+                    }
+                    upto = pendingUpto;
+
+                    // TODO: if we were more clever when writing the
+                    // index, such that a seek point wouldn't be written
+                    // until the int encoder "committed", we could avoid
+                    // this (likely minor) inefficiency:
+
+                    // This is necessary for int encoders that are
+                    // non-causal, ie must see future int values to
+                    // encode the current ones.
+                    while (upto >= blockSize)
+                    {
+                        upto -= blockSize;
+                        lastBlockFP = input.FilePointer;
+                        blockSize = blockReader.ReadBlock();
+                    }
+                    seekPending = false;
+                }
+            }
 
+            public override int Next()
+            {
+                this.MaybeSeek();
+                if (upto == blockSize)
+                {
+                    lastBlockFP = input.FilePointer;
+                    blockSize = blockReader.ReadBlock();
+                    upto = 0;
+                }
+
+                return pending[upto++];
+            }
+        }
+
+        private class InputIndex : IntIndexInputIndex
+        {
+            private readonly VariableIntBlockIndexInput outerInstance;
+
+            public InputIndex(VariableIntBlockIndexInput outerInstance)
+            {
+                this.outerInstance = outerInstance;
+            }
+
+            private long fp;
+            private int upto;
+
+            public override void Read(DataInput indexIn, bool absolute)
+            {
+                if (absolute)
+                {
+                    upto = indexIn.ReadVInt();
+                    fp = indexIn.ReadVLong();
+                }
+                else
+                {
+                    int uptoDelta = indexIn.ReadVInt();
+                    if ((uptoDelta & 1) == 1)
+                    {
+                        // same block
+                        upto += (int)((uint)uptoDelta >> 1);
+                    }
+                    else
+                    {
+                        // new block
+                        upto = (int)((uint)uptoDelta >> 1);
+                        fp += indexIn.ReadVLong();
+                    }
+                }
+                // TODO: we can't do this assert because non-causal
+                // int encoders can have upto over the buffer size
+                //assert upto < maxBlockSize: "upto=" + upto + " max=" + maxBlockSize;
+            }
+
+            public override string ToString()
+            {
+                return "VarIntBlock.Index fp=" + fp + " upto=" + upto + " maxBlock=" + outerInstance.maxBlockSize;
+            }
+
+            public override void Seek(IntIndexInputReader other)
+            {
+                ((InputReader)other).Seek(fp, upto);
+            }
+
+            public override void CopyFrom(IntIndexInputIndex other)
+            {
+                InputIndex idx = (InputIndex)other;
+                fp = idx.fp;
+                upto = idx.upto;
+            }
+
+            public override IntIndexInputIndex Clone()
+            {
+                InputIndex other = new InputIndex(outerInstance);
+                other.fp = fp;
+                other.upto = upto;
+                return other;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4137444b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
index dd30ba7..131ffcc 100644
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
@@ -1,27 +1,25 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.Intblock
-{
+\ufeffusing Lucene.Net.Codecs.Sep;
+using Lucene.Net.Store;
+using System.Diagnostics;
 
-    using System.Diagnostics;
-    using Sep;
-    using IntIndexOutput = Sep.IntIndexOutput;
-    using IndexOutput = Store.IndexOutput;
+namespace Lucene.Net.Codecs.IntBlock
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Naive int block API that writes vInts.  This is
@@ -43,7 +41,10 @@ namespace Lucene.Net.Codecs.Intblock
     /// </summary>
     public abstract class VariableIntBlockIndexOutput : IntIndexOutput
     {
-        private bool _hitExcDuringWrite;
+        protected readonly IndexOutput output;
+
+        private int upto;
+        private bool hitExcDuringWrite;
 
         // TODO what Var-Var codecs exist in practice... and what are there blocksizes like?
         // if its less than 128 we should set that as max and use byte?
@@ -56,8 +57,8 @@ namespace Lucene.Net.Codecs.Intblock
         /// </summary>
         protected internal VariableIntBlockIndexOutput(IndexOutput output, int maxBlockSize)
         {
-            OUTPUT = output;
-            output.WriteInt(maxBlockSize);
+            this.output = output;
+            this.output.WriteInt(maxBlockSize);
         }
 
         /// <summary>
@@ -68,37 +69,94 @@ namespace Lucene.Net.Codecs.Intblock
 
         public override IntIndexOutputIndex Index()
         {
-            return new IntBlockIndexOuput(this);
+            return new OutputIndex(this);
+        }
+
+        private class OutputIndex : IntIndexOutputIndex
+        {
+            private readonly VariableIntBlockIndexOutput outerInstance;
+
+            public OutputIndex(VariableIntBlockIndexOutput outerInstance)
+            {
+                this.outerInstance = outerInstance;
+            }
+
+            long fp;
+            int upto;
+            long lastFP;
+            int lastUpto;
+
+            public override void Mark()
+            {
+                fp = outerInstance.output.FilePointer;
+                upto = outerInstance.upto;
+            }
+
+            public override void CopyFrom(IntIndexOutputIndex other, bool copyLast)
+            {
+                OutputIndex idx = (OutputIndex)other;
+                fp = idx.fp;
+                upto = idx.upto;
+                if (copyLast)
+                {
+                    lastFP = fp;
+                    lastUpto = upto;
+                }
+            }
+
+            public override void Write(DataOutput indexOut, bool absolute)
+            {
+                Debug.Assert(upto >= 0);
+                if (absolute)
+                {
+                    indexOut.WriteVInt(upto);
+                    indexOut.WriteVLong(fp);
+                }
+                else if (fp == lastFP)
+                {
+                    // same block
+                    Debug.Assert(upto >= lastUpto);
+                    int uptoDelta = upto - lastUpto;
+                    indexOut.WriteVInt(uptoDelta << 1 | 1);
+                }
+                else
+                {
+                    // new block
+                    indexOut.WriteVInt(upto << 1);
+                    indexOut.WriteVLong(fp - lastFP);
+                }
+                lastUpto = upto;
+                lastFP = fp;
+            }
         }
 
         public override void Write(int v)
         {
-            _hitExcDuringWrite = true;
-            _upto -= Add(v) - 1;
-            _hitExcDuringWrite = false;
-            Debug.Assert(_upto >= 0);
+            hitExcDuringWrite = true;
+            upto -= Add(v) - 1;
+            hitExcDuringWrite = false;
+            Debug.Assert(upto >= 0);
         }
 
         public override void Dispose()
         {
             try
             {
-                if (_hitExcDuringWrite) return;
+                if (hitExcDuringWrite) return;
 
                 // stuff 0s in until the "real" data is flushed:
                 var stuffed = 0;
-                while (_upto > stuffed)
+                while (upto > stuffed)
                 {
-                    _upto -= Add(0) - 1;
-                    Debug.Assert(_upto >= 0);
+                    upto -= Add(0) - 1;
+                    Debug.Assert(upto >= 0);
                     stuffed += 1;
                 }
             }
             finally
             {
-                OUTPUT.Dispose();
+                output.Dispose();
             }
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4137444b/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj b/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
index f9a9902..4b17b1e 100644
--- a/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
+++ b/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
@@ -62,14 +62,10 @@
     <Compile Include="DiskDV\DiskDocValuesProducer.cs" />
     <Compile Include="DiskDV\DiskNormsFormat.cs" />
     <Compile Include="HashMapHelperClass.cs" />
-    <Compile Include="Intblock\FixedIntBlockIndexInput.cs" />
-    <Compile Include="Intblock\FixedIntBlockIndexOutput.cs" />
-    <Compile Include="Intblock\IBlockReader.cs" />
-    <Compile Include="Intblock\IntBlockIndexInput.cs" />
-    <Compile Include="Intblock\IntBlockIndexOutput.cs" />
-    <Compile Include="Intblock\IntBlockIndexReader.cs" />
-    <Compile Include="Intblock\VariableIntBlockIndexInput.cs" />
-    <Compile Include="Intblock\VariableIntBlockIndexOutput.cs" />
+    <Compile Include="IntBlock\FixedIntBlockIndexInput.cs" />
+    <Compile Include="IntBlock\FixedIntBlockIndexOutput.cs" />
+    <Compile Include="IntBlock\VariableIntBlockIndexInput.cs" />
+    <Compile Include="IntBlock\VariableIntBlockIndexOutput.cs" />
     <Compile Include="Memory\DirectDocValuesConsumer.cs" />
     <Compile Include="Memory\DirectDocValuesFormat.cs" />
     <Compile Include="Memory\DirectDocValuesProducer.cs" />


[28/47] lucenenet git commit: Fixed bugs in Codecs.Pulsing (wrong disposing logic and key not found exception).

Posted by ni...@apache.org.
Fixed bugs in Codecs.Pulsing (wrong disposing logic and key not found exception).


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/a84f1734
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/a84f1734
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/a84f1734

Branch: refs/heads/master
Commit: a84f1734fde12ca03f57af4e71fa009c1453ea58
Parents: d5d18d0
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 10 14:37:31 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:24 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a84f1734/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
index 46e4eb9..acb3442 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
@@ -259,8 +259,10 @@ namespace Lucene.Net.Codecs.Pulsing
 
         protected override void Dispose(bool disposing)
         {
-            if (!disposing)
+            if (disposing)
+            {
                 _wrappedPostingsReader.Dispose();
+            }
         }
         
         /// <summary>
@@ -278,7 +280,9 @@ namespace Lucene.Net.Codecs.Pulsing
                 return null;
             
             var atts = de.Attributes();
-            return atts.AddAttribute<IPulsingEnumAttribute>().Enums()[this];
+            DocsEnum result;
+            atts.AddAttribute<IPulsingEnumAttribute>().Enums().TryGetValue(this, out result);
+            return result;
         }
 
         /// <summary>


[23/47] lucenenet git commit: Added Codecs.Sep tests to the project

Posted by ni...@apache.org.
Added Codecs.Sep tests to the project


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/b5259f47
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/b5259f47
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/b5259f47

Branch: refs/heads/master
Commit: b5259f47cfca38a491a2bc4e550aead8bcc8918b
Parents: c5d44a5
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 00:01:24 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:22 2016 +0700

----------------------------------------------------------------------
 .../Lucene.Net.Tests.Codecs.csproj              |  1 +
 .../Sep/TestSepPostingsFormat.cs                | 45 ++++++++++----------
 2 files changed, 23 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b5259f47/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
index b2f11cd..7002ab5 100644
--- a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
+++ b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
@@ -46,6 +46,7 @@
     <Compile Include="Bloom\TestBloomPostingsFormat.cs" />
     <Compile Include="DiskDv\TestDiskDocValuesFormat.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Sep\TestSepPostingsFormat.cs" />
     <Compile Include="SimpleText\TestSimpleTextDocValuesFormat.cs" />
     <Compile Include="SimpleText\TestSimpleTextPostingsFormat.cs" />
     <Compile Include="SimpleText\TestSimpleTextStoredFieldsFormat.cs" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b5259f47/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
index 72fef6f..c374053 100644
--- a/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
@@ -1,7 +1,11 @@
-\ufeffnamespace org.apache.lucene.codecs.sep
-{
+\ufeffusing Lucene.Net.Codecs.MockSep;
+using Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.Sep
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,25 +22,20 @@
 	 * limitations under the License.
 	 */
 
-	using MockSepPostingsFormat = org.apache.lucene.codecs.mocksep.MockSepPostingsFormat;
-	using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Tests sep layout
-	/// </summary>
-	public class TestSepPostingsFormat : BasePostingsFormatTestCase
-	{
-	  // TODO: randomize cutoff
-	  private readonly Codec codec = TestUtil.alwaysPostingsFormat(new MockSepPostingsFormat());
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Tests sep layout
+    /// </summary>
+    public class TestSepPostingsFormat : BasePostingsFormatTestCase
+    {
+        // TODO: randomize cutoff
+        private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new MockSepPostingsFormat());
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file


[44/47] lucenenet git commit: Marked Core.Util.TestPagedBytes.TestOverflow() Ignored because it was ignored in Java (and throws an OOM exception most of the time).

Posted by ni...@apache.org.
Marked Core.Util.TestPagedBytes.TestOverflow() Ignored because it was ignored in Java (and throws an OOM exception most of the time).


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/eb6fd3ac
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/eb6fd3ac
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/eb6fd3ac

Branch: refs/heads/master
Commit: eb6fd3acdc7d17203c02d57181ef72ce2ab0c8f0
Parents: 2aaf3b5
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 05:51:47 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Oct 12 01:10:59 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Util/TestPagedBytes.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/eb6fd3ac/src/Lucene.Net.Tests/core/Util/TestPagedBytes.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestPagedBytes.cs b/src/Lucene.Net.Tests/core/Util/TestPagedBytes.cs
index 42e305a..89908e9 100644
--- a/src/Lucene.Net.Tests/core/Util/TestPagedBytes.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestPagedBytes.cs
@@ -178,9 +178,10 @@ namespace Lucene.Net.Util
             }
         }
 
+        [Ignore] // memory hole
         [Test]
         [LongRunningTest, Timeout(120000)]
-        public virtual void TestOverflow() // memory hole
+        public virtual void TestOverflow()
         {
             BaseDirectoryWrapper dir = NewFSDirectory(CreateTempDir("testOverflow"));
             if (dir is MockDirectoryWrapper)


[16/47] lucenenet git commit: Fixed cloning behavior of Core.Store.DataInput to match Java Lucene.

Posted by ni...@apache.org.
Fixed cloning behavior of Core.Store.DataInput to match Java Lucene.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/731a4cbf
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/731a4cbf
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/731a4cbf

Branch: refs/heads/master
Commit: 731a4cbf5d2ead98e9efe16eccefe2ae8249674c
Parents: 92c3a07
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Oct 9 01:39:29 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:20 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Store/DataInput.cs  | 11 ++++++++++-
 src/Lucene.Net.Core/Store/IndexInput.cs | 11 +----------
 2 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/731a4cbf/src/Lucene.Net.Core/Store/DataInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/DataInput.cs b/src/Lucene.Net.Core/Store/DataInput.cs
index 5280e7e..7691a0b 100644
--- a/src/Lucene.Net.Core/Store/DataInput.cs
+++ b/src/Lucene.Net.Core/Store/DataInput.cs
@@ -265,7 +265,16 @@ namespace Lucene.Net.Store
         /// </summary>
         public virtual object Clone()
         {
-            return (DataInput)base.MemberwiseClone();
+            DataInput clone = null;
+            try
+            {
+                clone = (DataInput)base.MemberwiseClone();
+            }
+            catch (Exception)
+            {
+            }
+
+            return clone;
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/731a4cbf/src/Lucene.Net.Core/Store/IndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/IndexInput.cs b/src/Lucene.Net.Core/Store/IndexInput.cs
index 1dea1ca..0f05136 100644
--- a/src/Lucene.Net.Core/Store/IndexInput.cs
+++ b/src/Lucene.Net.Core/Store/IndexInput.cs
@@ -85,16 +85,7 @@ namespace Lucene.Net.Store
         /// </summary>
         public override object Clone()
         {
-            IndexInput clone = null;
-            try
-            {
-                clone = (IndexInput)base.MemberwiseClone();
-            }
-            catch (System.Exception)
-            {
-            }
-
-            return clone;
+            return (IndexInput)base.Clone();
         }
     }
 }
\ No newline at end of file


[27/47] lucenenet git commit: Marked the Core.Index.MergePolicy.MergeException class serializable.

Posted by ni...@apache.org.
Marked the Core.Index.MergePolicy.MergeException class serializable.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/b00ad494
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/b00ad494
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/b00ad494

Branch: refs/heads/master
Commit: b00ad494fa102835748319b606d6cf348fac0409
Parents: a84f173
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 10 14:38:15 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:24 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Index/MergePolicy.cs | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b00ad494/src/Lucene.Net.Core/Index/MergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/MergePolicy.cs b/src/Lucene.Net.Core/Index/MergePolicy.cs
index b48a55b..2112ddf 100644
--- a/src/Lucene.Net.Core/Index/MergePolicy.cs
+++ b/src/Lucene.Net.Core/Index/MergePolicy.cs
@@ -456,6 +456,8 @@ namespace Lucene.Net.Index
         /// Exception thrown if there are any problems while
         ///  executing a merge.
         /// </summary>
+        // LUCENENET: All exeption classes should be marked serializable
+        [Serializable]
         public class MergeException : Exception
         {
             internal Directory Dir;


[07/47] lucenenet git commit: Fixed several bugs that were causing the Codecs.SimpleText tests to fail.

Posted by ni...@apache.org.
Fixed several bugs that were causing the Codecs.SimpleText tests to fail.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/166ef1ee
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/166ef1ee
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/166ef1ee

Branch: refs/heads/master
Commit: 166ef1ee3b451b2e961c22b98e36a397b0926294
Parents: 2fa691b
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Oct 8 13:13:29 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sat Oct 8 17:15:41 2016 +0700

----------------------------------------------------------------------
 .../SimpleText/SimpleTextDocValuesReader.cs     | 77 ++++++++++----------
 .../SimpleText/SimpleTextDocValuesWriter.cs     | 60 ++++++++-------
 .../SimpleText/SimpleTextFieldInfosReader.cs    |  3 +-
 .../SimpleText/SimpleTextFieldInfosWriter.cs    | 19 ++---
 .../SimpleText/SimpleTextFieldsReader.cs        | 16 ++--
 .../SimpleText/SimpleTextSegmentInfoReader.cs   | 13 ++--
 .../SimpleText/SimpleTextStoredFieldsReader.cs  | 19 +++--
 .../SimpleText/SimpleTextTermVectorsReader.cs   | 11 +--
 .../SimpleText/SimpleTextTermVectorsWriter.cs   |  2 +-
 src/Lucene.Net.Core/Document/Document.cs        |  2 +-
 src/Lucene.Net.Core/Index/IndexWriter.cs        |  8 +-
 src/Lucene.Net.Core/Index/SegmentInfo.cs        |  2 +-
 .../Index/StandardDirectoryReader.cs            | 14 ++--
 .../Store/TrackingDirectoryWrapper.cs           |  3 +-
 .../Store/MockDirectoryWrapper.cs               | 17 +++--
 .../Store/MockIndexInputWrapper.cs              |  6 +-
 16 files changed, 146 insertions(+), 126 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
index 7725777..da92bac 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
@@ -21,24 +21,27 @@ namespace Lucene.Net.Codecs.SimpleText
     using System.Diagnostics;
     using System.Collections.Generic;
     using System.ComponentModel;
+    using System.Globalization;
+    using System.Text;
     using Support;
 
-	using BinaryDocValues = Index.BinaryDocValues;
-	using CorruptIndexException = Index.CorruptIndexException;
-	using DocValues = Index.DocValues;
-	using FieldInfo = Index.FieldInfo;
-	using DocValuesType = Index.FieldInfo.DocValuesType_e;
-	using IndexFileNames = Index.IndexFileNames;
-	using NumericDocValues = Index.NumericDocValues;
-	using SegmentReadState = Index.SegmentReadState;
-	using SortedDocValues = Index.SortedDocValues;
-	using SortedSetDocValues = Index.SortedSetDocValues;
-	using BufferedChecksumIndexInput = Store.BufferedChecksumIndexInput;
-	using ChecksumIndexInput = Store.ChecksumIndexInput;
-	using IndexInput = Store.IndexInput;
-	using Bits = Util.Bits;
-	using BytesRef = Util.BytesRef;
-	using StringHelper = Util.StringHelper;
+    using BinaryDocValues = Index.BinaryDocValues;
+    using CorruptIndexException = Index.CorruptIndexException;
+    using DocValues = Index.DocValues;
+    using FieldInfo = Index.FieldInfo;
+    using DocValuesType = Index.FieldInfo.DocValuesType_e;
+    using IndexFileNames = Index.IndexFileNames;
+    using NumericDocValues = Index.NumericDocValues;
+    using SegmentReadState = Index.SegmentReadState;
+    using SortedDocValues = Index.SortedDocValues;
+    using SortedSetDocValues = Index.SortedSetDocValues;
+    using BufferedChecksumIndexInput = Store.BufferedChecksumIndexInput;
+    using ChecksumIndexInput = Store.ChecksumIndexInput;
+    using IndexInput = Store.IndexInput;
+    using Bits = Util.Bits;
+    using BytesRef = Util.BytesRef;
+    using StringHelper = Util.StringHelper;
+    using System.Numerics;
 
     public class SimpleTextDocValuesReader : DocValuesProducer
     {
@@ -205,7 +208,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
         protected override void Dispose(bool disposing)
         {
-            if (disposing) return;
+            if (!disposing) return;
 
             DATA.Dispose();
         }
@@ -242,7 +245,7 @@ namespace Lucene.Net.Codecs.SimpleText
         /// <summary> Used only in ctor: </summary>
         private string StripPrefix(BytesRef prefix)
         {
-            return SCRATCH.Bytes.SubList(SCRATCH.Offset + prefix.Length, SCRATCH.Length - prefix.Length).ToString();
+            return Encoding.UTF8.GetString(SCRATCH.Bytes, SCRATCH.Offset + prefix.Length, SCRATCH.Length - prefix.Length);
         }
 
         public override long RamBytesUsed()
@@ -324,8 +327,8 @@ namespace Lucene.Net.Codecs.SimpleText
                 int len;
                 try
                 {
-                    len = int.Parse(_scratch.Bytes.SubList(_scratch.Offset + SimpleTextDocValuesWriter.LENGTH.Length,
-                                _scratch.Length - SimpleTextDocValuesWriter.LENGTH.Length).ToString());
+                    len = int.Parse(Encoding.UTF8.GetString(_scratch.Bytes, _scratch.Offset + SimpleTextDocValuesWriter.LENGTH.Length,
+                        _scratch.Length - SimpleTextDocValuesWriter.LENGTH.Length), NumberStyles.Number, CultureInfo.InvariantCulture);
                 }
                 catch (FormatException ex)
                 {
@@ -380,7 +383,8 @@ namespace Lucene.Net.Codecs.SimpleText
                 SimpleTextUtil.ReadLine(_input, _scratch);
                 try
                 {
-                    return int.Parse(Decimal.Parse(_scratch.Utf8ToString()).ToString(_ordDecoderFormat)) - 1;
+                    // LUCNENENET: .NET doesn't have a way to specify a pattern with integer, but all of the standard ones are built in.
+                    return int.Parse(_scratch.Utf8ToString(), NumberStyles.Integer, CultureInfo.InvariantCulture) - 1;
                 }
                 catch (Exception pe)
                 {
@@ -403,11 +407,10 @@ namespace Lucene.Net.Codecs.SimpleText
                 int len;
                 try
                 {
-                    len =
-                        int.Parse(
-                            Decimal.Parse(_scratch.Bytes.SubList(
-                                _scratch.Offset + SimpleTextDocValuesWriter.LENGTH.Length,
-                                _scratch.Length - SimpleTextDocValuesWriter.LENGTH.Length).ToString()).ToString(_decoderFormat));
+                    // LUCNENENET: .NET doesn't have a way to specify a pattern with integer, but all of the standard ones are built in.
+                    len = int.Parse(Encoding.UTF8.GetString(_scratch.Bytes, _scratch.Offset + SimpleTextDocValuesWriter.LENGTH.Length,
+                        _scratch.Length - SimpleTextDocValuesWriter.LENGTH.Length), NumberStyles.Integer, CultureInfo.InvariantCulture);
+
                 }
                 catch (Exception pe)
                 {
@@ -488,11 +491,9 @@ namespace Lucene.Net.Codecs.SimpleText
                 int len;
                 try
                 {
-                    len =
-                        int.Parse(
-                            Decimal.Parse(_scratch.Bytes.SubList(
-                                _scratch.Offset + SimpleTextDocValuesWriter.LENGTH.Length,
-                                _scratch.Length - SimpleTextDocValuesWriter.LENGTH.Length).ToString()).ToString(_decoderFormat));
+                    // LUCNENENET: .NET doesn't have a way to specify a pattern with integer, but all of the standard ones are built in.
+                    len = int.Parse(Encoding.UTF8.GetString(_scratch.Bytes, _scratch.Offset + SimpleTextDocValuesWriter.LENGTH.Length,
+                        _scratch.Length - SimpleTextDocValuesWriter.LENGTH.Length), NumberStyles.Integer, CultureInfo.InvariantCulture);
                 }
                 catch (Exception pe)
                 {
@@ -538,10 +539,12 @@ namespace Lucene.Net.Codecs.SimpleText
                 _input.Seek(_field.DataStartFilePointer + (1 + _field.Pattern.Length + 2) * docId);
                 SimpleTextUtil.ReadLine(_input, _scratch);
 
-                long bd;
+                
+                decimal bd;
                 try
                 {
-                    bd = long.Parse(_scratch.Utf8ToString());
+                    // LUCNENENET: .NET doesn't have a way to specify a pattern with decimal, but all of the standard ones are built in.
+                    bd = decimal.Parse(_scratch.Utf8ToString(), NumberStyles.Float, CultureInfo.InvariantCulture);
                 }
                 catch (FormatException ex)
                 {
@@ -549,7 +552,7 @@ namespace Lucene.Net.Codecs.SimpleText
                 }
 
                 SimpleTextUtil.ReadLine(_input, _scratch); // read the line telling us if its real or not
-                return _field.MinValue + bd;
+                return (long)BigInteger.Add(new BigInteger(_field.MinValue), new BigInteger(bd));
             }
         }
 
@@ -582,9 +585,9 @@ namespace Lucene.Net.Codecs.SimpleText
                 int len;
                 try
                 {
-                    len = int.Parse(_scratch.Bytes.SubList(
-                                _scratch.Offset + SimpleTextDocValuesWriter.LENGTH.Length,
-                                _scratch.Length - SimpleTextDocValuesWriter.LENGTH.Length).ToString());
+                    // LUCNENENET: .NET doesn't have a way to specify a pattern with integer, but all of the standard ones are built in.
+                    len = int.Parse(Encoding.UTF8.GetString(_scratch.Bytes, _scratch.Offset + SimpleTextDocValuesWriter.LENGTH.Length,
+                        _scratch.Length - SimpleTextDocValuesWriter.LENGTH.Length), NumberStyles.Integer, CultureInfo.InvariantCulture);
                 }
                 catch (FormatException ex)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
index e2bd264..f31947a 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
@@ -21,6 +21,8 @@ namespace Lucene.Net.Codecs.SimpleText
     using System;
     using System.Diagnostics;
     using System.Collections.Generic;
+    using System.Globalization;
+    using System.Numerics;
     using System.Text;
 
     using FieldInfo = Index.FieldInfo;
@@ -74,21 +76,21 @@ namespace Lucene.Net.Codecs.SimpleText
             foreach (var n in values)
             {
                 var v = n.GetValueOrDefault();
-                minValue = Math.Min(minValue, v); // Added .Value to account for long?
-                maxValue = Math.Max(maxValue, v); // Added .Value to account for long?
+                minValue = Math.Min(minValue, v);
+                maxValue = Math.Max(maxValue, v);
             }
 
             // write our minimum value to the .dat, all entries are deltas from that
             SimpleTextUtil.Write(data, MINVALUE);
-            SimpleTextUtil.Write(data, Convert.ToString(minValue), scratch);
+            SimpleTextUtil.Write(data, minValue.ToString(CultureInfo.InvariantCulture), scratch);
             SimpleTextUtil.WriteNewline(data);
 
             // build up our fixed-width "simple text packed ints" format
-            System.Numerics.BigInteger maxBig = maxValue;
-            System.Numerics.BigInteger minBig = minValue;
-            var diffBig = maxBig - minBig;
+            BigInteger maxBig = maxValue;
+            BigInteger minBig = minValue;
+            var diffBig = BigInteger.Subtract(maxBig, minBig);
 
-            var maxBytesPerValue = diffBig.ToString().Length;
+            var maxBytesPerValue = diffBig.ToString(CultureInfo.InvariantCulture).Length;
             var sb = new StringBuilder();
             for (var i = 0; i < maxBytesPerValue; i++)
                 sb.Append('0');
@@ -109,8 +111,8 @@ namespace Lucene.Net.Codecs.SimpleText
 
                 Debug.Assert(value >= minValue);
 
-                var delta = value - minValue;
-                string s = delta.ToString(patternString);
+                var delta = BigInteger.Subtract(value, minValue);
+                string s = delta.ToString(patternString, CultureInfo.InvariantCulture);
                 Debug.Assert(s.Length == patternString.Length);
                 SimpleTextUtil.Write(data, s, scratch);
                 SimpleTextUtil.WriteNewline(data);
@@ -138,18 +140,20 @@ namespace Lucene.Net.Codecs.SimpleText
 
             // write maxLength
             SimpleTextUtil.Write(data, MAXLENGTH);
-            SimpleTextUtil.Write(data, Convert.ToString(maxLength), scratch);
+            SimpleTextUtil.Write(data, maxLength.ToString(CultureInfo.InvariantCulture), scratch);
             SimpleTextUtil.WriteNewline(data);
 
-            var maxBytesLength = Convert.ToString(maxLength).Length;
+            var maxBytesLength = maxLength.ToString(CultureInfo.InvariantCulture).Length;
             var sb = new StringBuilder();
             for (var i = 0; i < maxBytesLength; i++)
             {
                 sb.Append('0');
             }
             // write our pattern for encoding lengths
+            var patternString = sb.ToString();
+
             SimpleTextUtil.Write(data, PATTERN);
-            SimpleTextUtil.Write(data, sb.ToString(), scratch);
+            SimpleTextUtil.Write(data, patternString, scratch);
             SimpleTextUtil.WriteNewline(data);
             
            
@@ -158,7 +162,7 @@ namespace Lucene.Net.Codecs.SimpleText
             {
                 int length = value == null ? 0 : value.Length;
                 SimpleTextUtil.Write(data, LENGTH);
-                SimpleTextUtil.Write(data, length.ToString(sb.ToString()), scratch);
+                SimpleTextUtil.Write(data, length.ToString(patternString, CultureInfo.InvariantCulture), scratch);
                 SimpleTextUtil.WriteNewline(data);
 
                 // write bytes -- don't use SimpleText.Write
@@ -198,15 +202,15 @@ namespace Lucene.Net.Codecs.SimpleText
 
             // write numValues
             SimpleTextUtil.Write(data, NUMVALUES);
-            SimpleTextUtil.Write(data, Convert.ToString(valueCount), scratch);
+            SimpleTextUtil.Write(data, valueCount.ToString(CultureInfo.InvariantCulture), scratch);
             SimpleTextUtil.WriteNewline(data);
 
             // write maxLength
             SimpleTextUtil.Write(data, MAXLENGTH);
-            SimpleTextUtil.Write(data, Convert.ToString(maxLength), scratch);
+            SimpleTextUtil.Write(data, maxLength.ToString(CultureInfo.InvariantCulture), scratch);
             SimpleTextUtil.WriteNewline(data);
 
-            int maxBytesLength = Convert.ToString(maxLength).Length;
+            int maxBytesLength = maxLength.ToString(CultureInfo.InvariantCulture).Length;
             var sb = new StringBuilder();
             for (int i = 0; i < maxBytesLength; i++)
             {
@@ -220,7 +224,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
             var encoderFormat = sb.ToString();
 
-            int maxOrdBytes = Convert.ToString(valueCount + 1L).Length;
+            int maxOrdBytes = (valueCount + 1L).ToString(CultureInfo.InvariantCulture).Length;
             sb.Length = 0;
             for (int i = 0; i < maxOrdBytes; i++)
             {
@@ -241,7 +245,7 @@ namespace Lucene.Net.Codecs.SimpleText
             {
                 // write length
                 SimpleTextUtil.Write(data, LENGTH);
-                SimpleTextUtil.Write(data, value.Length.ToString(encoderFormat), scratch);
+                SimpleTextUtil.Write(data, value.Length.ToString(encoderFormat, CultureInfo.InvariantCulture), scratch);
                 SimpleTextUtil.WriteNewline(data);
 
                 // write bytes -- don't use SimpleText.Write
@@ -251,7 +255,7 @@ namespace Lucene.Net.Codecs.SimpleText
                 // pad to fit
                 for (int i = value.Length; i < maxLength; i++)
                 {
-                    data.WriteByte((byte)(sbyte) ' ');
+                    data.WriteByte((byte)' ');
                 }
                 SimpleTextUtil.WriteNewline(data);
                 valuesSeen++;
@@ -262,7 +266,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
             foreach (var ord in docToOrd)
             {
-                SimpleTextUtil.Write(data, (ord + 1).Value.ToString(ordEncoderFormat), scratch);
+                SimpleTextUtil.Write(data, (ord + 1).GetValueOrDefault().ToString(ordEncoderFormat, CultureInfo.InvariantCulture), scratch);
                 SimpleTextUtil.WriteNewline(data);
             }
         }
@@ -284,15 +288,15 @@ namespace Lucene.Net.Codecs.SimpleText
 
             // write numValues
             SimpleTextUtil.Write(data, NUMVALUES);
-            SimpleTextUtil.Write(data, Convert.ToString(valueCount), scratch);
+            SimpleTextUtil.Write(data, valueCount.ToString(CultureInfo.InvariantCulture), scratch);
             SimpleTextUtil.WriteNewline(data);
 
             // write maxLength
             SimpleTextUtil.Write(data, MAXLENGTH);
-            SimpleTextUtil.Write(data, Convert.ToString(maxLength), scratch);
+            SimpleTextUtil.Write(data, maxLength.ToString(CultureInfo.InvariantCulture), scratch);
             SimpleTextUtil.WriteNewline(data);
 
-            int maxBytesLength = Convert.ToString(maxLength).Length;
+            int maxBytesLength = maxLength.ToString(CultureInfo.InvariantCulture).Length;
             var sb = new StringBuilder();
             for (int i = 0; i < maxBytesLength; i++)
             {
@@ -323,7 +327,7 @@ namespace Lucene.Net.Codecs.SimpleText
                     {
                         sb2.Append(",");
                     }
-                    sb2.Append(Convert.ToString(ord));
+                    sb2.Append(ord.GetValueOrDefault().ToString(CultureInfo.InvariantCulture));
                 }
                 maxOrdListLength = Math.Max(maxOrdListLength, sb2.Length);
             }
@@ -346,7 +350,7 @@ namespace Lucene.Net.Codecs.SimpleText
             {
                 // write length
                 SimpleTextUtil.Write(data, LENGTH);
-                SimpleTextUtil.Write(data, value.Length.ToString(encoderFormat), scratch);
+                SimpleTextUtil.Write(data, value.Length.ToString(encoderFormat, CultureInfo.InvariantCulture), scratch);
                 SimpleTextUtil.WriteNewline(data);
 
                 // write bytes -- don't use SimpleText.Write
@@ -356,7 +360,7 @@ namespace Lucene.Net.Codecs.SimpleText
                 // pad to fit
                 for (var i = value.Length; i < maxLength; i++)
                 {
-                    data.WriteByte((byte)(sbyte) ' ');
+                    data.WriteByte((byte)' ');
                 }
                 SimpleTextUtil.WriteNewline(data);
                 valuesSeen++;
@@ -379,7 +383,7 @@ namespace Lucene.Net.Codecs.SimpleText
                     if (sb2.Length > 0)
                         sb2.Append(",");
                     
-                    sb2.Append(Convert.ToString(ord));
+                    sb2.Append(ord);
                 }
                 // now pad to fit: these are numbers so spaces work well. reader calls trim()
                 var numPadding = maxOrdListLength - sb2.Length;
@@ -394,7 +398,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
         protected override void Dispose(bool disposing)
         {
-            if (data == null || disposing) return;
+            if (data == null || !disposing) return;
             var success = false;
             try
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
index fff24f0..97b5a85 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
@@ -34,6 +34,7 @@ namespace Lucene.Net.Codecs.SimpleText
     using BytesRef = Util.BytesRef;
     using IOUtils = Util.IOUtils;
     using StringHelper = Util.StringHelper;
+    using System.Text;
 
     /// <summary>
     /// reads plaintext field infos files
@@ -166,7 +167,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
         private static string ReadString(int offset, BytesRef scratch)
         {
-            return scratch.Bytes.SubList(scratch.Offset + offset, scratch.Length + offset).ToString();
+            return Encoding.UTF8.GetString(scratch.Bytes, scratch.Offset + offset, scratch.Length - offset);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
index 355d360..bf72238 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
@@ -30,6 +30,7 @@ namespace Lucene.Net.Codecs.SimpleText
     using IOContext = Store.IOContext;
     using BytesRef = Util.BytesRef;
     using IOUtils = Util.IOUtils;
+    using System.Globalization;
 
     /// <summary>
     /// writes plaintext field infos files
@@ -73,7 +74,7 @@ namespace Lucene.Net.Codecs.SimpleText
             try
             {
                 SimpleTextUtil.Write(output, NUMFIELDS);
-                SimpleTextUtil.Write(output, Convert.ToString(infos.Size()), scratch);
+                SimpleTextUtil.Write(output, infos.Size().ToString(CultureInfo.InvariantCulture), scratch);
                 SimpleTextUtil.WriteNewline(output);
 
                 foreach (FieldInfo fi in infos)
@@ -83,11 +84,11 @@ namespace Lucene.Net.Codecs.SimpleText
                     SimpleTextUtil.WriteNewline(output);
 
                     SimpleTextUtil.Write(output, NUMBER);
-                    SimpleTextUtil.Write(output, Convert.ToString(fi.Number), scratch);
+                    SimpleTextUtil.Write(output, fi.Number.ToString(CultureInfo.InvariantCulture), scratch);
                     SimpleTextUtil.WriteNewline(output);
 
                     SimpleTextUtil.Write(output, ISINDEXED);
-                    SimpleTextUtil.Write(output, Convert.ToString(fi.Indexed), scratch);
+                    SimpleTextUtil.Write(output, fi.Indexed.ToString(CultureInfo.InvariantCulture).ToLowerInvariant(), scratch);
                     SimpleTextUtil.WriteNewline(output);
 
                     if (fi.Indexed)
@@ -99,15 +100,15 @@ namespace Lucene.Net.Codecs.SimpleText
                     }
 
                     SimpleTextUtil.Write(output, STORETV);
-                    SimpleTextUtil.Write(output, Convert.ToString(fi.HasVectors()), scratch);
+                    SimpleTextUtil.Write(output, fi.HasVectors().ToString(CultureInfo.InvariantCulture).ToLowerInvariant(), scratch);
                     SimpleTextUtil.WriteNewline(output);
 
                     SimpleTextUtil.Write(output, PAYLOADS);
-                    SimpleTextUtil.Write(output, Convert.ToString(fi.HasPayloads()), scratch);
+                    SimpleTextUtil.Write(output, fi.HasPayloads().ToString(CultureInfo.InvariantCulture).ToLowerInvariant(), scratch);
                     SimpleTextUtil.WriteNewline(output);
 
                     SimpleTextUtil.Write(output, NORMS);
-                    SimpleTextUtil.Write(output, Convert.ToString(!fi.OmitsNorms()), scratch);
+                    SimpleTextUtil.Write(output, (!fi.OmitsNorms()).ToString(CultureInfo.InvariantCulture).ToLowerInvariant(), scratch);
                     SimpleTextUtil.WriteNewline(output);
 
                     SimpleTextUtil.Write(output, NORMS_TYPE);
@@ -119,13 +120,13 @@ namespace Lucene.Net.Codecs.SimpleText
                     SimpleTextUtil.WriteNewline(output);
 
                     SimpleTextUtil.Write(output, DOCVALUES_GEN);
-                    SimpleTextUtil.Write(output, Convert.ToString(fi.DocValuesGen), scratch);
+                    SimpleTextUtil.Write(output, fi.DocValuesGen.ToString(CultureInfo.InvariantCulture), scratch);
                     SimpleTextUtil.WriteNewline(output);
 
                     IDictionary<string, string> atts = fi.Attributes();
                     int numAtts = atts == null ? 0 : atts.Count;
                     SimpleTextUtil.Write(output, NUM_ATTS);
-                    SimpleTextUtil.Write(output, Convert.ToString(numAtts), scratch);
+                    SimpleTextUtil.Write(output, numAtts.ToString(CultureInfo.InvariantCulture), scratch);
                     SimpleTextUtil.WriteNewline(output);
 
                     if (numAtts <= 0 || atts == null) continue;
@@ -156,7 +157,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private static string GetDocValuesType(FieldInfo.DocValuesType_e? type)
+        private static string GetDocValuesType(DocValuesType? type)
         {
             return type.HasValue ? type.ToString() : "false";
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
index cfa1467..1bc6c17 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
@@ -22,6 +22,7 @@ namespace Lucene.Net.Codecs.SimpleText
     using System.Diagnostics;
     using System.Collections.Generic;
     using System.Linq;
+    using System.Text;
     using Support;
     using Util.Fst;
     
@@ -99,8 +100,8 @@ namespace Lucene.Net.Codecs.SimpleText
                 
                 if (StringHelper.StartsWith(scratch, SimpleTextFieldsWriter.FIELD))
                 {
-                    var fieldName = scratch.Bytes.SubList(scratch.Offset + SimpleTextFieldsWriter.FIELD.Length,
-                        scratch.Length - SimpleTextFieldsWriter.FIELD.Length).ToString();
+                    var fieldName = Encoding.UTF8.GetString(scratch.Bytes, scratch.Offset + SimpleTextFieldsWriter.FIELD.Length,
+                        scratch.Length - SimpleTextFieldsWriter.FIELD.Length);
                     fields[fieldName] = input.FilePointer;
                 }
             }
@@ -737,11 +738,14 @@ namespace Lucene.Net.Codecs.SimpleText
         {
             lock (this)
             {
-                Terms terms = _termsCache[field];
-                if (terms != null) return terms;
+                SimpleTextTerms terms;
+                if (_termsCache.TryGetValue(field, out terms))
+                {
+                    return terms;
+                }
 
-                var fp = _fields[field];
-                if (fp == null)
+                long? fp;
+                if (!_fields.TryGetValue(field, out fp) || !fp.HasValue)
                 {
                     return null;
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
index 01236cd..eac795c 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
@@ -31,6 +31,8 @@ namespace Lucene.Net.Codecs.SimpleText
     using BytesRef = Util.BytesRef;
     using IOUtils = Util.IOUtils;
     using StringHelper = Util.StringHelper;
+    using System.Text;
+    using System.Globalization;
 
     /// <summary>
     /// reads plaintext segments files
@@ -57,15 +59,15 @@ namespace Lucene.Net.Codecs.SimpleText
 
                 SimpleTextUtil.ReadLine(input, scratch);
                 Debug.Assert(StringHelper.StartsWith(scratch, SimpleTextSegmentInfoWriter.SI_DOCCOUNT));
-                int docCount = Convert.ToInt32(ReadString(SimpleTextSegmentInfoWriter.SI_DOCCOUNT.Length, scratch));
+                int docCount = Convert.ToInt32(ReadString(SimpleTextSegmentInfoWriter.SI_DOCCOUNT.Length, scratch), CultureInfo.InvariantCulture);
 
                 SimpleTextUtil.ReadLine(input, scratch);
                 Debug.Assert(StringHelper.StartsWith(scratch, SimpleTextSegmentInfoWriter.SI_USECOMPOUND));
-                bool isCompoundFile = Convert.ToBoolean(ReadString(SimpleTextSegmentInfoWriter.SI_USECOMPOUND.Length, scratch));
+                bool isCompoundFile = Convert.ToBoolean(ReadString(SimpleTextSegmentInfoWriter.SI_USECOMPOUND.Length, scratch), CultureInfo.InvariantCulture);
 
                 SimpleTextUtil.ReadLine(input, scratch);
                 Debug.Assert(StringHelper.StartsWith(scratch, SimpleTextSegmentInfoWriter.SI_NUM_DIAG));
-                int numDiag = Convert.ToInt32(ReadString(SimpleTextSegmentInfoWriter.SI_NUM_DIAG.Length, scratch));
+                int numDiag = Convert.ToInt32(ReadString(SimpleTextSegmentInfoWriter.SI_NUM_DIAG.Length, scratch), CultureInfo.InvariantCulture);
                 IDictionary<string, string> diagnostics = new Dictionary<string, string>();
 
                 for (int i = 0; i < numDiag; i++)
@@ -82,7 +84,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
                 SimpleTextUtil.ReadLine(input, scratch);
                 Debug.Assert(StringHelper.StartsWith(scratch, SimpleTextSegmentInfoWriter.SI_NUM_FILES));
-                int numFiles = Convert.ToInt32(ReadString(SimpleTextSegmentInfoWriter.SI_NUM_FILES.Length, scratch));
+                int numFiles = Convert.ToInt32(ReadString(SimpleTextSegmentInfoWriter.SI_NUM_FILES.Length, scratch), CultureInfo.InvariantCulture);
                 var files = new HashSet<string>();
 
                 for (int i = 0; i < numFiles; i++)
@@ -115,8 +117,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
         private static string ReadString(int offset, BytesRef scratch)
         {
-            return scratch.Bytes.SubList(scratch.Offset + offset, scratch.Length - offset).ToString();
-            //return new string(scratch.Bytes, scratch.Offset + offset, scratch.Length - offset, StandardCharsets.UTF_8);
+            return Encoding.UTF8.GetString(scratch.Bytes, scratch.Offset + offset, scratch.Length - offset);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
index 2fa032c..7953828 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
@@ -20,6 +20,8 @@ namespace Lucene.Net.Codecs.SimpleText
 
     using System;
     using System.Diagnostics;
+    using System.Globalization;
+    using System.Text;
     using Support;
 
 	using FieldInfo = Index.FieldInfo;
@@ -185,11 +187,8 @@ namespace Lucene.Net.Codecs.SimpleText
             if (Equals(type, SimpleTextStoredFieldsWriter.TYPE_STRING))
             {
                 visitor.StringField(fieldInfo,
-                    _scratch.Bytes.SubList(_scratch.Offset + SimpleTextStoredFieldsWriter.VALUE.Length,
-                        _scratch.Length - SimpleTextStoredFieldsWriter.VALUE.Length).ToString());
-
-                   // new string(_scratch.Bytes, _scratch.Offset + SimpleTextStoredFieldsWriter.VALUE.Length, _scratch.Length - SimpleTextStoredFieldsWriter.VALUE.Length,
-                   //     Encoding.UTF8));
+                    Encoding.UTF8.GetString(_scratch.Bytes, _scratch.Offset + SimpleTextStoredFieldsWriter.VALUE.Length,
+                        _scratch.Length - SimpleTextStoredFieldsWriter.VALUE.Length));
             }
             else if (Equals(type, SimpleTextStoredFieldsWriter.TYPE_BINARY))
             {
@@ -201,25 +200,25 @@ namespace Lucene.Net.Codecs.SimpleText
             {
                 UnicodeUtil.UTF8toUTF16(_scratch.Bytes, _scratch.Offset + SimpleTextStoredFieldsWriter.VALUE.Length, _scratch.Length - SimpleTextStoredFieldsWriter.VALUE.Length,
                     _scratchUtf16);
-                visitor.IntField(fieldInfo, Convert.ToInt32(_scratchUtf16.ToString()));
+                visitor.IntField(fieldInfo, Convert.ToInt32(_scratchUtf16.ToString(), CultureInfo.InvariantCulture));
             }
             else if (Equals(type, SimpleTextStoredFieldsWriter.TYPE_LONG))
             {
                 UnicodeUtil.UTF8toUTF16(_scratch.Bytes, _scratch.Offset + SimpleTextStoredFieldsWriter.VALUE.Length, _scratch.Length - SimpleTextStoredFieldsWriter.VALUE.Length,
                     _scratchUtf16);
-                visitor.LongField(fieldInfo, Convert.ToInt64(_scratchUtf16.ToString()));
+                visitor.LongField(fieldInfo, Convert.ToInt64(_scratchUtf16.ToString(), CultureInfo.InvariantCulture));
             }
             else if (Equals(type, SimpleTextStoredFieldsWriter.TYPE_FLOAT))
             {
                 UnicodeUtil.UTF8toUTF16(_scratch.Bytes, _scratch.Offset + SimpleTextStoredFieldsWriter.VALUE.Length, _scratch.Length - SimpleTextStoredFieldsWriter.VALUE.Length,
                     _scratchUtf16);
-                visitor.FloatField(fieldInfo, Convert.ToSingle(_scratchUtf16.ToString()));
+                visitor.FloatField(fieldInfo, Convert.ToSingle(_scratchUtf16.ToString(), CultureInfo.InvariantCulture));
             }
             else if (Equals(type, SimpleTextStoredFieldsWriter.TYPE_DOUBLE))
             {
                 UnicodeUtil.UTF8toUTF16(_scratch.Bytes, _scratch.Offset + SimpleTextStoredFieldsWriter.VALUE.Length, _scratch.Length - SimpleTextStoredFieldsWriter.VALUE.Length,
                     _scratchUtf16);
-                visitor.DoubleField(fieldInfo, Convert.ToDouble(_scratchUtf16.ToString()));
+                visitor.DoubleField(fieldInfo, Convert.ToDouble(_scratchUtf16.ToString(), CultureInfo.InvariantCulture));
             }
         }
 
@@ -234,7 +233,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
         protected override void Dispose(bool disposing)
         {
-            if (disposing) return;
+            if (!disposing) return;
 
             try
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
index 666f467..46b6338 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
@@ -23,6 +23,7 @@ namespace Lucene.Net.Codecs.SimpleText
     
     using System;
     using System.Diagnostics;
+    using System.Globalization;
     using System.Collections.Generic;
 
 	using DocsAndPositionsEnum = Index.DocsAndPositionsEnum;
@@ -138,15 +139,15 @@ namespace Lucene.Net.Codecs.SimpleText
 
                 ReadLine();
                 Debug.Assert(StringHelper.StartsWith(_scratch, SimpleTextTermVectorsWriter.FIELDPOSITIONS));
-                var positions = Convert.ToBoolean(ReadString(SimpleTextTermVectorsWriter.FIELDPOSITIONS.Length, _scratch));
+                var positions = Convert.ToBoolean(ReadString(SimpleTextTermVectorsWriter.FIELDPOSITIONS.Length, _scratch), CultureInfo.InvariantCulture);
 
                 ReadLine();
                 Debug.Assert(StringHelper.StartsWith(_scratch, SimpleTextTermVectorsWriter.FIELDOFFSETS));
-                var offsets = Convert.ToBoolean(ReadString(SimpleTextTermVectorsWriter.FIELDOFFSETS.Length, _scratch));
+                var offsets = Convert.ToBoolean(ReadString(SimpleTextTermVectorsWriter.FIELDOFFSETS.Length, _scratch), CultureInfo.InvariantCulture);
 
                 ReadLine();
                 Debug.Assert(StringHelper.StartsWith(_scratch, SimpleTextTermVectorsWriter.FIELDPAYLOADS));
-                var payloads = Convert.ToBoolean(ReadString(SimpleTextTermVectorsWriter.FIELDPAYLOADS.Length, _scratch));
+                var payloads = Convert.ToBoolean(ReadString(SimpleTextTermVectorsWriter.FIELDPAYLOADS.Length, _scratch), CultureInfo.InvariantCulture);
 
                 ReadLine();
                 Debug.Assert(StringHelper.StartsWith(_scratch, SimpleTextTermVectorsWriter.FIELDTERMCOUNT));
@@ -240,7 +241,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
         protected override void Dispose(bool disposing)
         {
-            if (disposing) return;
+            if (!disposing) return;
 
             try
             {
@@ -298,7 +299,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public override Terms Terms(string field)
             {
-                return _fields[field];
+                return _fields.ContainsKey(field) ? _fields[field] : null;
             }
 
             public override int Size

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
index b824c15..3425006 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
@@ -203,7 +203,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
         protected override void Dispose(bool disposing)
         {
-            if (disposing) return;
+            if (!disposing) return;
 
             try
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Core/Document/Document.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/Document.cs b/src/Lucene.Net.Core/Document/Document.cs
index 30b8634..1c138d4 100644
--- a/src/Lucene.Net.Core/Document/Document.cs
+++ b/src/Lucene.Net.Core/Document/Document.cs
@@ -266,7 +266,7 @@ namespace Lucene.Net.Documents
         {
             foreach (IndexableField field in fields)
             {
-                if (field.Name.Equals(name) && field.StringValue != null)
+                if (field.Name.Equals(name, System.StringComparison.Ordinal) && field.StringValue != null)
                 {
                     return field.StringValue;
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Core/Index/IndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/IndexWriter.cs b/src/Lucene.Net.Core/Index/IndexWriter.cs
index 85160bc..d8daebb 100644
--- a/src/Lucene.Net.Core/Index/IndexWriter.cs
+++ b/src/Lucene.Net.Core/Index/IndexWriter.cs
@@ -5916,7 +5916,6 @@ namespace Lucene.Net.Index
         /// </summary>
         private static bool SlowFileExists(Directory dir, string fileName)
         {
-            /*
             try
             {
                 dir.OpenInput(fileName, IOContext.DEFAULT).Dispose();
@@ -5925,8 +5924,11 @@ namespace Lucene.Net.Index
             catch (FileNotFoundException)
             {
                 return false;
-            }*/
-            return dir.FileExists(fileName);
+            }
+            catch (NoSuchFileException)
+            {
+                return false;
+            }
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Core/Index/SegmentInfo.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/SegmentInfo.cs b/src/Lucene.Net.Core/Index/SegmentInfo.cs
index b239435..4118e3c 100644
--- a/src/Lucene.Net.Core/Index/SegmentInfo.cs
+++ b/src/Lucene.Net.Core/Index/SegmentInfo.cs
@@ -289,7 +289,7 @@ namespace Lucene.Net.Index
                 {
                     throw new InvalidOperationException("files were not computed yet");
                 }
-                return SetFiles;//CollectionsHelper.UnmodifiableSet(SetFiles);
+                return Collections.UnmodifiableSet(SetFiles);
             }
 
             set

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Core/Index/StandardDirectoryReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/StandardDirectoryReader.cs b/src/Lucene.Net.Core/Index/StandardDirectoryReader.cs
index 72e4b26..7ee43e8 100644
--- a/src/Lucene.Net.Core/Index/StandardDirectoryReader.cs
+++ b/src/Lucene.Net.Core/Index/StandardDirectoryReader.cs
@@ -55,20 +55,20 @@ namespace Lucene.Net.Index
 
         private class FindSegmentsFileAnonymousInnerClassHelper : SegmentInfos.FindSegmentsFile
         {
-            private new readonly Directory Directory;
-            private readonly int TermInfosIndexDivisor;
+            private readonly Directory directory;
+            private readonly int termInfosIndexDivisor;
 
             public FindSegmentsFileAnonymousInnerClassHelper(Directory directory, int termInfosIndexDivisor)
                 : base(directory)
             {
-                this.Directory = directory;
-                this.TermInfosIndexDivisor = termInfosIndexDivisor;
+                this.directory = directory;
+                this.termInfosIndexDivisor = termInfosIndexDivisor;
             }
 
             protected internal override object DoBody(string segmentFileName)
             {
                 var sis = new SegmentInfos();
-                sis.Read(Directory, segmentFileName);
+                sis.Read(directory, segmentFileName);
                 var readers = new SegmentReader[sis.Size()];
                 for (int i = sis.Size() - 1; i >= 0; i--)
                 {
@@ -76,7 +76,7 @@ namespace Lucene.Net.Index
                     bool success = false;
                     try
                     {
-                        readers[i] = new SegmentReader(sis.Info(i), TermInfosIndexDivisor, IOContext.READ);
+                        readers[i] = new SegmentReader(sis.Info(i), termInfosIndexDivisor, IOContext.READ);
                         success = true;
                     }
                     catch (System.IO.IOException ex)
@@ -91,7 +91,7 @@ namespace Lucene.Net.Index
                         }
                     }
                 }
-                return new StandardDirectoryReader(Directory, readers, null, sis, TermInfosIndexDivisor, false);
+                return new StandardDirectoryReader(directory, readers, null, sis, termInfosIndexDivisor, false);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.Core/Store/TrackingDirectoryWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/TrackingDirectoryWrapper.cs b/src/Lucene.Net.Core/Store/TrackingDirectoryWrapper.cs
index 028e654..5b57989 100644
--- a/src/Lucene.Net.Core/Store/TrackingDirectoryWrapper.cs
+++ b/src/Lucene.Net.Core/Store/TrackingDirectoryWrapper.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Support;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Store
@@ -25,7 +26,7 @@ namespace Lucene.Net.Store
     /// </summary>
     public sealed class TrackingDirectoryWrapper : FilterDirectory
     {
-        private readonly ISet<string> CreatedFileNames = new HashSet<string>();
+        private readonly ISet<string> CreatedFileNames = new ConcurrentHashSet<string>();
 
         public TrackingDirectoryWrapper(Directory @in)
             : base(@in)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs b/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs
index d220833..18576b7 100644
--- a/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs
+++ b/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs
@@ -301,8 +301,9 @@ namespace Lucene.Net.Store
                     {
                         f.Dispose();
                     }
-                    catch (Exception)
+                    catch (Exception ex)
                     {
+                        Debug.WriteLine("Crash(): f.Dispose() FAILED for {0}:\n{1}", f.ToString(), ex.ToString());
                     }
                 }
 
@@ -741,13 +742,16 @@ namespace Lucene.Net.Store
                 if (OpenFiles.TryGetValue(name, out v))
                 {
                     v++;
+                    //Debug.WriteLine("Add {0} - {1} - {2}", c, name, v);
                     OpenFiles[name] = v;
                 }
                 else
                 {
+                    //Debug.WriteLine("Add {0} - {1} - {2}", c, name, 1);
                     OpenFiles[name] = 1;
-                    OpenFileHandles[c] = new Exception("unclosed Index" + handle.ToString() + ": " + name);
                 }
+
+                OpenFileHandles[c] = new Exception("unclosed Index" + handle.ToString() + ": " + name);
             }
         }
 
@@ -1087,16 +1091,19 @@ namespace Lucene.Net.Store
                 {
                     if (v == 1)
                     {
+                        //Debug.WriteLine("RemoveOpenFile OpenFiles.Remove {0} - {1}", c, name);
                         OpenFiles.Remove(name);
-                        Exception _;
-                        OpenFileHandles.TryRemove(c, out _);
                     }
                     else
                     {
                         v--;
                         OpenFiles[name] = v;
+                        //Debug.WriteLine("RemoveOpenFile OpenFiles DECREMENT {0} - {1} - {2}", c, name, v);
                     }
                 }
+
+                Exception _;
+                OpenFileHandles.TryRemove(c, out _);
             }
         }
 
@@ -1342,7 +1349,7 @@ namespace Lucene.Net.Store
                     if (disposing)
                     {
                         DelegateHandle.Dispose();
-                        OuterInstance.RemoveOpenFile(this, Name);
+                        OuterInstance.RemoveOpenFile(OuterInstance, Name);
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/166ef1ee/src/Lucene.Net.TestFramework/Store/MockIndexInputWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Store/MockIndexInputWrapper.cs b/src/Lucene.Net.TestFramework/Store/MockIndexInputWrapper.cs
index 1adc4b0..7bb594e 100644
--- a/src/Lucene.Net.TestFramework/Store/MockIndexInputWrapper.cs
+++ b/src/Lucene.Net.TestFramework/Store/MockIndexInputWrapper.cs
@@ -49,7 +49,7 @@ namespace Lucene.Net.Store
             {
                 // turn on the following to look for leaks closing inputs,
                 // after fixing TestTransactions
-                Dir.MaybeThrowDeterministicException();
+                // Dir.MaybeThrowDeterministicException();
             }
             finally
             {
@@ -62,10 +62,6 @@ namespace Lucene.Net.Store
                 {
                     Dir.RemoveIndexInput(this, Name);
                 }
-                else
-                {
-                    //Could this be where things aren't being deleted?
-                }
             }
         }
 


[10/47] lucenenet git commit: Made all test methods in BaseDocValuesFormatTestCase and BaseStoredFieldsFormatTestCase virtual so they can be overridden and used in the correct context. For now, leaving the [Test] attributes in place.

Posted by ni...@apache.org.
Made all test methods in BaseDocValuesFormatTestCase and BaseStoredFieldsFormatTestCase virtual so they can be overridden and used in the correct context. For now, leaving the [Test] attributes in place.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/450e647e
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/450e647e
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/450e647e

Branch: refs/heads/master
Commit: 450e647e133bca6d4c3a770f5f00d475c6825bf7
Parents: 166ef1e
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Oct 8 16:19:02 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sat Oct 8 17:15:42 2016 +0700

----------------------------------------------------------------------
 .../Index/BaseDocValuesFormatTestCase.cs        | 154 ++++++++++---------
 .../Index/BaseStoredFieldsFormatTestCase.cs     |  20 +--
 2 files changed, 89 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/450e647e/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
index 2f14fe5..ebc4c19 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
@@ -85,7 +85,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestOneNumber()
+        public virtual void TestOneNumber()
         {
             Directory directory = NewDirectory();
             RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
@@ -120,7 +120,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestOneFloat()
+        public virtual void TestOneFloat()
         {
             Directory directory = NewDirectory();
             RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
@@ -155,7 +155,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestTwoNumbers()
+        public virtual void TestTwoNumbers()
         {
             Directory directory = NewDirectory();
             RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
@@ -193,7 +193,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestTwoBinaryValues()
+        public virtual void TestTwoBinaryValues()
         {
             Directory directory = NewDirectory();
             RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
@@ -234,7 +234,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestTwoFieldsMixed()
+        public virtual void TestTwoFieldsMixed()
         {
             Directory directory = NewDirectory();
             RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
@@ -274,7 +274,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestThreeFieldsMixed()
+        public virtual void TestThreeFieldsMixed()
         {
             Directory directory = NewDirectory();
             RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
@@ -319,7 +319,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestThreeFieldsMixed2()
+        public virtual void TestThreeFieldsMixed2()
         {
             Directory directory = NewDirectory();
             RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
@@ -364,7 +364,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestTwoDocumentsNumeric()
+        public virtual void TestTwoDocumentsNumeric()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -393,7 +393,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestTwoDocumentsMerged()
+        public virtual void TestTwoDocumentsMerged()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -437,7 +437,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestBigNumericRange()
+        public virtual void TestBigNumericRange()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -466,7 +466,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestBigNumericRange2()
+        public virtual void TestBigNumericRange2()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -495,7 +495,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestBytes()
+        public virtual void TestBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -535,7 +535,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestBytesTwoDocumentsMerged()
+        public virtual void TestBytesTwoDocumentsMerged()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -581,7 +581,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedBytes()
+        public virtual void TestSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -621,7 +621,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedBytesTwoDocuments()
+        public virtual void TestSortedBytesTwoDocuments()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -653,7 +653,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedBytesThreeDocuments()
+        public virtual void TestSortedBytesThreeDocuments()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -692,7 +692,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedBytesTwoDocumentsMerged()
+        public virtual void TestSortedBytesTwoDocumentsMerged()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -743,7 +743,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedMergeAwayAllValues()
+        public virtual void TestSortedMergeAwayAllValues()
         {
             Directory directory = NewDirectory();
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -785,7 +785,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestBytesWithNewline()
+        public virtual void TestBytesWithNewline()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -811,7 +811,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestMissingSortedBytes()
+        public virtual void TestMissingSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -844,7 +844,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedTermsEnum()
+        public virtual void TestSortedTermsEnum()
         {
             Directory directory = NewDirectory();
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -917,7 +917,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestEmptySortedBytes()
+        public virtual void TestEmptySortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -949,7 +949,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestEmptyBytes()
+        public virtual void TestEmptyBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -981,7 +981,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestVeryLargeButLegalBytes()
+        public virtual void TestVeryLargeButLegalBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -1010,7 +1010,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestVeryLargeButLegalSortedBytes()
+        public virtual void TestVeryLargeButLegalSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -1038,7 +1038,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestCodecUsesOwnBytes()
+        public virtual void TestCodecUsesOwnBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -1066,7 +1066,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestCodecUsesOwnSortedBytes()
+        public virtual void TestCodecUsesOwnSortedBytes()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -1094,7 +1094,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestCodecUsesOwnBytesEachTime()
+        public virtual void TestCodecUsesOwnBytesEachTime()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -1129,7 +1129,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestCodecUsesOwnSortedBytesEachTime()
+        public virtual void TestCodecUsesOwnSortedBytesEachTime()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
 
@@ -1167,7 +1167,7 @@ namespace Lucene.Net.Index
          * Simple test case to show how to use the API
          */
         [Test]
-        public void TestDocValuesSimple()
+        public virtual void TestDocValuesSimple()
         {
             Directory dir = NewDirectory();
             Analyzer analyzer = new MockAnalyzer(Random());
@@ -1212,7 +1212,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestRandomSortedBytes()
+        public virtual void TestRandomSortedBytes()
         {
             Directory dir = NewDirectory();
             IndexWriterConfig cfg = NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random()));
@@ -1489,7 +1489,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestBooleanNumericsVsStoredFields()
+        public virtual void TestBooleanNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1499,7 +1499,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestByteNumericsVsStoredFields()
+        public virtual void TestByteNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1509,7 +1509,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestByteMissingVsFieldCache()
+        public virtual void TestByteMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1519,7 +1519,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestShortNumericsVsStoredFields()
+        public virtual void TestShortNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1529,7 +1529,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestShortMissingVsFieldCache()
+        public virtual void TestShortMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1539,7 +1539,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestIntNumericsVsStoredFields()
+        public virtual void TestIntNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1549,7 +1549,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestIntMissingVsFieldCache()
+        public virtual void TestIntMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1559,7 +1559,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestLongNumericsVsStoredFields()
+        public virtual void TestLongNumericsVsStoredFields()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1569,7 +1569,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestLongMissingVsFieldCache()
+        public virtual void TestLongMissingVsFieldCache()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1644,7 +1644,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestBinaryFixedLengthVsStoredFields()
+        public virtual void TestBinaryFixedLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1655,7 +1655,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestBinaryVariableLengthVsStoredFields()
+        public virtual void TestBinaryVariableLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1789,7 +1789,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedFixedLengthVsStoredFields()
+        public virtual void TestSortedFixedLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1800,7 +1800,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedFixedLengthVsFieldCache()
+        public virtual void TestSortedFixedLengthVsFieldCache()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1811,7 +1811,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedVariableLengthVsFieldCache()
+        public virtual void TestSortedVariableLengthVsFieldCache()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1821,7 +1821,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedVariableLengthVsStoredFields()
+        public virtual void TestSortedVariableLengthVsStoredFields()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -1831,7 +1831,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetOneValue()
+        public virtual void TestSortedSetOneValue()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
@@ -1859,7 +1859,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetTwoFields()
+        public virtual void TestSortedSetTwoFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
@@ -1897,7 +1897,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetTwoDocumentsMerged()
+        public virtual void TestSortedSetTwoDocumentsMerged()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
@@ -1942,7 +1942,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetTwoValues()
+        public virtual void TestSortedSetTwoValues()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
@@ -1975,7 +1975,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetTwoValuesUnordered()
+        public virtual void TestSortedSetTwoValuesUnordered()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
@@ -2008,7 +2008,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetThreeValuesTwoDocs()
+        public virtual void TestSortedSetThreeValuesTwoDocs()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
@@ -2060,7 +2060,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetTwoDocumentsLastMissing()
+        public virtual void TestSortedSetTwoDocumentsLastMissing()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
@@ -2095,7 +2095,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetTwoDocumentsLastMissingMerge()
+        public virtual void TestSortedSetTwoDocumentsLastMissingMerge()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
@@ -2132,7 +2132,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetTwoDocumentsFirstMissing()
+        public virtual void TestSortedSetTwoDocumentsFirstMissing()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
@@ -2168,7 +2168,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetTwoDocumentsFirstMissingMerge()
+        public virtual void TestSortedSetTwoDocumentsFirstMissingMerge()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
@@ -2205,7 +2205,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetMergeAwayAllValues()
+        public virtual void TestSortedSetMergeAwayAllValues()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
@@ -2236,7 +2236,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetTermsEnum()
+        public virtual void TestSortedSetTermsEnum()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
@@ -2392,7 +2392,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetFixedLengthVsStoredFields()
+        public virtual void TestSortedSetFixedLengthVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             int numIterations = AtLeast(1);
@@ -2404,7 +2404,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetVariableLengthVsStoredFields()
+        public virtual void TestSortedSetVariableLengthVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             int numIterations = AtLeast(1);
@@ -2415,7 +2415,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        public virtual void TestSortedSetFixedLengthSingleValuedVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             int numIterations = AtLeast(1);
@@ -2427,7 +2427,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        public virtual void TestSortedSetVariableLengthSingleValuedVsStoredFields()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             int numIterations = AtLeast(1);
@@ -2649,7 +2649,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetFixedLengthVsUninvertedField()
+        public virtual void TestSortedSetFixedLengthVsUninvertedField()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             int numIterations = AtLeast(1);
@@ -2661,7 +2661,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestSortedSetVariableLengthVsUninvertedField()
+        public virtual void TestSortedSetVariableLengthVsUninvertedField()
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             int numIterations = AtLeast(1);
@@ -2672,7 +2672,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestGCDCompression()
+        public virtual void TestGCDCompression()
         {
             int numIterations = AtLeast(1);
             for (int i = 0; i < numIterations; i++)
@@ -2704,11 +2704,13 @@ namespace Lucene.Net.Index
             }
         }
 
+        [Test]
         public virtual void TestZeros()
         {
             DoTestNumericsVsStoredFields(0, 0);
         }
 
+        [Test]
         public virtual void TestZeroOrMin()
         {
             // try to make GCD compression fail if the format did not anticipate that
@@ -2737,7 +2739,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestTwoNumbersOneMissing()
+        public virtual void TestTwoNumbersOneMissing()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
             Directory directory = NewDirectory();
@@ -2768,7 +2770,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestTwoNumbersOneMissingWithMerging()
+        public virtual void TestTwoNumbersOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
             Directory directory = NewDirectory();
@@ -2800,7 +2802,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestThreeNumbersOneMissingWithMerging()
+        public virtual void TestThreeNumbersOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
             Directory directory = NewDirectory();
@@ -2838,7 +2840,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestTwoBytesOneMissing()
+        public virtual void TestTwoBytesOneMissing()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
             Directory directory = NewDirectory();
@@ -2872,7 +2874,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestTwoBytesOneMissingWithMerging()
+        public virtual void TestTwoBytesOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
             Directory directory = NewDirectory();
@@ -2907,7 +2909,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestThreeBytesOneMissingWithMerging()
+        public virtual void TestThreeBytesOneMissingWithMerging()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
             Directory directory = NewDirectory();
@@ -2950,7 +2952,7 @@ namespace Lucene.Net.Index
 
         // LUCENE-4853
         [Test]
-        public void TestHugeBinaryValues()
+        public virtual void TestHugeBinaryValues()
         {
             Analyzer analyzer = new MockAnalyzer(Random());
             // FSDirectory because SimpleText will consume gobbs of
@@ -3071,7 +3073,7 @@ namespace Lucene.Net.Index
 
         // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
         [Test]
-        public void TestHugeBinaryValueLimit()
+        public virtual void TestHugeBinaryValueLimit()
         {
             // We only test DVFormats that have a limit
             AssumeFalse("test requires codec with limits on max binary field length", CodecAcceptsHugeBinaryValues("field"));
@@ -3156,7 +3158,7 @@ namespace Lucene.Net.Index
         /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
         /// </summary>
         [Test]
-        public void TestThreads()
+        public virtual void TestThreads()
         {
             Directory dir = NewDirectory();
             IndexWriterConfig conf = NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random()));
@@ -3275,7 +3277,7 @@ namespace Lucene.Net.Index
         /// Tests dv against stored fields with threads (all types + missing)
         /// </summary>
         [Test]
-        public void TestThreads2()
+        public virtual void TestThreads2()
         {
             AssumeTrue("Codec does not support GetDocsWithField", DefaultCodecSupportsDocsWithField());
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -3465,7 +3467,7 @@ namespace Lucene.Net.Index
 
         // LUCENE-5218
         [Test]
-        public void TestEmptyBinaryValueOnPageSizes()
+        public virtual void TestEmptyBinaryValueOnPageSizes()
         {
             // Test larger and larger power-of-two sized values,
             // followed by empty string value:

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/450e647e/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
index 9fbdafd..0b11f29 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
@@ -74,6 +74,7 @@ namespace Lucene.Net.Index
             }
         }
 
+        [Test]
         public virtual void TestRandomStoredFields()
         {
             Directory dir = NewDirectory();
@@ -191,7 +192,7 @@ namespace Lucene.Net.Index
 
         [Test]
         // LUCENE-1727: make sure doc fields are stored in order
-        public void TestStoredFieldsOrder()
+        public virtual void TestStoredFieldsOrder()
         {
             Directory d = NewDirectory();
             IndexWriter w = new IndexWriter(d, NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random())));
@@ -228,7 +229,7 @@ namespace Lucene.Net.Index
 
         [Test]
         // LUCENE-1219
-        public void TestBinaryFieldOffsetLength()
+        public virtual void TestBinaryFieldOffsetLength()
         {
             Directory dir = NewDirectory();
             IndexWriter w = new IndexWriter(dir, NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random())));
@@ -260,7 +261,8 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        public void TestNumericField()
+        [Test]
+        public virtual void TestNumericField()
         {
             Directory dir = NewDirectory();
             var w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
@@ -345,7 +347,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestIndexedBit()
+        public virtual void TestIndexedBit()
         {
             Directory dir = NewDirectory();
             RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
@@ -364,7 +366,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestReadSkip()
+        public virtual void TestReadSkip()
         {
             Directory dir = NewDirectory();
             IndexWriterConfig iwConf = NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random()));
@@ -419,7 +421,7 @@ namespace Lucene.Net.Index
         }
 
         [Test, Timeout(300000)]
-        public void TestEmptyDocs()
+        public virtual void TestEmptyDocs()
         {
             Directory dir = NewDirectory();
             IndexWriterConfig iwConf = NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random()));
@@ -448,7 +450,7 @@ namespace Lucene.Net.Index
         }
 
         [Test, Timeout(300000)]
-        public void TestConcurrentReads()
+        public virtual void TestConcurrentReads()
         {
             Directory dir = NewDirectory();
             IndexWriterConfig iwConf = NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random()));
@@ -669,7 +671,7 @@ namespace Lucene.Net.Index
         }
 
         [Test, LongRunningTest, Timeout(int.MaxValue)]
-        public void TestBigDocuments()
+        public virtual void TestBigDocuments()
         {
             // "big" as "much bigger than the chunk size"
             // for this test we force a FS dir
@@ -746,7 +748,7 @@ namespace Lucene.Net.Index
         }
 
         [Test]
-        public void TestBulkMergeWithDeletes()
+        public virtual void TestBulkMergeWithDeletes()
         {
             int numDocs = AtLeast(200);
             Directory dir = NewDirectory();


[30/47] lucenenet git commit: Fixed infinite recursion bug in TestFramework.Index.BaseTermVectorsTestCase.RandomDocument.

Posted by ni...@apache.org.
Fixed infinite recursion bug in TestFramework.Index.BaseTermVectorsTestCase.RandomDocument.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/6d50af12
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/6d50af12
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/6d50af12

Branch: refs/heads/master
Commit: 6d50af125870adb383f451604c868022e53d346c
Parents: c574b75
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 10 18:23:10 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:26 2016 +0700

----------------------------------------------------------------------
 .../Index/BaseTermVectorsFormatTestCase.cs              | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6d50af12/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
index 97b9e59..85207ad 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
@@ -421,10 +421,14 @@ namespace Lucene.Net.Index
                 HashSet<string> usedFileNames = new HashSet<string>();
                 for (int i = 0; i < fieldCount; ++i)
                 {
-                    do
-                    {
-                        this.FieldNames[i] = RandomInts.RandomFrom(Random(), fieldNames);
-                    } while (usedFileNames.Contains(this.FieldNames[i]));
+                    // LUCENENET NOTE: Using a simple Linq query to filter rather than using brute force makes this a lot
+                    // faster (and won't infinitely retry due to poor random distribution).
+                    this.FieldNames[i] = RandomInts.RandomFrom(Random(), fieldNames.Except(usedFileNames).ToArray());
+                    //do
+                    //{
+                    //    this.FieldNames[i] = RandomInts.RandomFrom(Random(), fieldNames);
+                    //} while (usedFileNames.Contains(this.FieldNames[i]));
+
                     usedFileNames.Add(this.FieldNames[i]);
                     TokenStreams[i] = new RandomTokenStream(outerInstance, TestUtil.NextInt(Random(), 1, maxTermCount), sampleTerms, sampleTermBytes);
                 }


[15/47] lucenenet git commit: Codecs: Fixed more inverted disposing logic.

Posted by ni...@apache.org.
Codecs: Fixed more inverted disposing logic.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/868616b7
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/868616b7
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/868616b7

Branch: refs/heads/master
Commit: 868616b7ccaced9a2a196cc30d18183f79574b0d
Parents: 2a4a921
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Oct 8 17:38:27 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:20 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs | 2 +-
 src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs | 2 +-
 src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs          | 2 +-
 src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs          | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/868616b7/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs b/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
index 210b066..4fb2a00 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
@@ -163,7 +163,7 @@ namespace Lucene.Net.Codecs.Memory
 
         protected override void Dispose(bool disposing)
         {
-            if (disposing) return;
+            if (!disposing) return;
 
             var success = false;
             try

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/868616b7/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
index 6858b71..18936e8 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
@@ -226,7 +226,7 @@ namespace Lucene.Net.Codecs.Memory
 
         protected override void Dispose(bool disposing)
         {
-            if (disposing) return;
+            if (!disposing) return;
 
             var success = false;
             try

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/868616b7/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
index 234d906..02c74d2 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
@@ -110,7 +110,7 @@ namespace Lucene.Net.Codecs.Sep
 
         protected override void Dispose(bool disposing)
         {
-            if (disposing) return;
+            if (!disposing) return;
 
             IOUtils.Close(_freqIn, _docIn, _skipIn, _posIn, _payloadIn);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/868616b7/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
index 602f724..d490538 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
@@ -402,7 +402,7 @@ namespace Lucene.Net.Codecs.Sep
 
         protected override void Dispose(bool disposing)
         {
-            if (disposing) return;
+            if (!disposing) return;
 
             IOUtils.Close(DOC_OUT, SKIP_OUT, FREQ_OUT, POS_OUT, PAYLOAD_OUT);
         }


[41/47] lucenenet git commit: HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context.

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
index ace0574..889f963 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
@@ -35,5 +35,506 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
index 990e29c..0bfd3d7 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
@@ -36,5 +36,68 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
index 6f30a01..910584c 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
@@ -35,5 +35,68 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
index ddb99c6..eb47d6c 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
@@ -35,5 +35,68 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
index cac7e77..7e094fd 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
@@ -35,5 +35,68 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
index e9beed4..13afde6 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
@@ -35,5 +35,68 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
index 4f65807..33895b1 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
@@ -40,5 +40,531 @@ namespace Lucene.Net.Codecs.Memory
         {
             return false;
         }
+
+
+        #region BaseCompressingDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestUniqueValuesCompression()
+        {
+            base.TestUniqueValuesCompression();
+        }
+
+        [Test]
+        public override void TestDateCompression()
+        {
+            base.TestDateCompression();
+        }
+
+        [Test]
+        public override void TestSingleBigValueCompression()
+        {
+            base.TestSingleBigValueCompression();
+        }
+
+        #endregion
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
index 938ae52..0f35370 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
@@ -36,5 +36,67 @@ namespace Lucene.Net.Codecs.Memory
                 return codec;
             }
         }
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
index cd6f9f2..19cd845 100644
--- a/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Pulsing/TestPulsingPostingsFormat.cs
@@ -36,5 +36,68 @@ namespace Lucene.Net.Codecs.Pulsing
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
index c374053..d1c5f29 100644
--- a/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Sep/TestSepPostingsFormat.cs
@@ -37,5 +37,67 @@ namespace Lucene.Net.Codecs.Sep
                 return codec;
             }
         }
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
index 497e26f..bdd6d82 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextDocValuesFormat.cs
@@ -42,5 +42,505 @@ namespace Lucene.Net.Codecs.SimpleText
                 return codec;
             }
         }
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
index a8cb997..96e6cb8 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs
@@ -34,5 +34,68 @@ namespace Lucene.Net.Codecs.SimpleText
                 return codec;
             }
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
index 5dab469..1d3ae31 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs
@@ -31,5 +31,93 @@ namespace Lucene.Net.Codecs.SimpleText
                 return new SimpleTextCodec();
             }
         }
+
+        #region BaseStoredFieldsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestRandomStoredFields()
+        {
+            base.TestRandomStoredFields();
+        }
+
+        [Test]
+        // LUCENE-1727: make sure doc fields are stored in order
+        public override void TestStoredFieldsOrder()
+        {
+            base.TestStoredFieldsOrder();
+        }
+
+        [Test]
+        // LUCENE-1219
+        public override void TestBinaryFieldOffsetLength()
+        {
+            base.TestBinaryFieldOffsetLength();
+        }
+
+        [Test]
+        public override void TestNumericField()
+        {
+            base.TestNumericField();
+        }
+
+        [Test]
+        public override void TestIndexedBit()
+        {
+            base.TestIndexedBit();
+        }
+
+        [Test]
+        public override void TestReadSkip()
+        {
+            base.TestReadSkip();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestEmptyDocs()
+        {
+            base.TestEmptyDocs();
+        }
+
+        [Test, Timeout(300000)]
+        public override void TestConcurrentReads()
+        {
+            base.TestConcurrentReads();
+        }
+
+        [Test]
+        public override void TestWriteReadMerge()
+        {
+            base.TestWriteReadMerge();
+        }
+
+        [Test, LongRunningTest]
+        public override void TestBigDocuments()
+        {
+            base.TestBigDocuments();
+        }
+
+        [Test]
+        public override void TestBulkMergeWithDeletes()
+        {
+            base.TestBulkMergeWithDeletes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
index a5fe4c5..527deea 100644
--- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextTermVectorsFormat.cs
@@ -30,5 +30,71 @@ namespace Lucene.Net.Codecs.SimpleText
                 return new SimpleTextCodec();
             }
         }
+
+        #region BaseTermVectorsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        // only one doc with vectors
+        public override void TestRareVectors()
+        {
+            base.TestRareVectors();
+        }
+
+        [Test]
+        public override void TestHighFreqs()
+        {
+            base.TestHighFreqs();
+        }
+
+        [Test]
+        public override void TestLotsOfFields()
+        {
+            base.TestLotsOfFields();
+        }
+
+        [Test, Timeout(300000)]
+        // different options for the same field
+        public override void TestMixedOptions()
+        {
+            base.TestMixedOptions();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestMerge()
+        {
+            base.TestMerge();
+        }
+
+        [Test]
+        // run random tests from different threads to make sure the per-thread clones
+        // don't share mutable data
+        public override void TestClone()
+        {
+            base.TestClone();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
index 164f275..fdc0e95 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/IndexSortingTest.cs
@@ -87,5 +87,61 @@ namespace Lucene.Net.Index.Sorter
             reader = SlowCompositeReaderWrapper.Wrap(DirectoryReader.Open(dir));
             assertFalse("index should not have deletions", reader.HasDeletions);
         }
+
+
+        #region SorterTestBase
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestBinaryDocValuesField()
+        {
+            base.TestBinaryDocValuesField();
+        }
+
+        [Test]
+        public override void TestDocsAndPositionsEnum()
+        {
+            base.TestDocsAndPositionsEnum();
+        }
+
+        [Test]
+        public override void TestDocsEnum()
+        {
+            base.TestDocsEnum();
+        }
+
+        [Test]
+        public override void TestNormValues()
+        {
+            base.TestNormValues();
+        }
+
+        [Test]
+        public override void TestNumericDocValuesField()
+        {
+            base.TestNumericDocValuesField();
+        }
+
+        [Test]
+        public override void TestSortedDocValuesField()
+        {
+            base.TestSortedDocValuesField();
+        }
+
+        [Test]
+        public override void TestSortedSetDocValuesField()
+        {
+            base.TestSortedSetDocValuesField();
+        }
+
+        [Test]
+        public override void TestTermVectors()
+        {
+            base.TestTermVectors();
+        }
+
+        #endregion
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
index 2cff135..99623ad 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
@@ -230,7 +230,7 @@ namespace Lucene.Net.Index.Sorter
             dir.Dispose();
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestBinaryDocValuesField()
         {
             BinaryDocValues dv = reader.GetBinaryDocValues(BINARY_DV_FIELD);
@@ -242,7 +242,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsAndPositionsEnum()
         {
             TermsEnum termsEnum = reader.Terms(DOC_POSITIONS_FIELD).Iterator(null);
@@ -322,7 +322,7 @@ namespace Lucene.Net.Index.Sorter
             return bits;
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDocsEnum()
         {
             Bits mappedLiveDocs = RandomLiveDocs(reader.MaxDoc);
@@ -369,7 +369,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestNormValues()
         {
             NumericDocValues dv = reader.GetNormValues(NORMS_FIELD);
@@ -380,7 +380,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestNumericDocValuesField()
         {
             NumericDocValues dv = reader.GetNumericDocValues(NUMERIC_DV_FIELD);
@@ -391,7 +391,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedDocValuesField()
         {
             SortedDocValues dv = reader.GetSortedDocValues(SORTED_DV_FIELD);
@@ -404,7 +404,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestSortedSetDocValuesField()
         {
             AssumeTrue("default codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
@@ -423,7 +423,7 @@ namespace Lucene.Net.Index.Sorter
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTermVectors()
         {
             int maxDoc = reader.MaxDoc;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
index cb2b38e..93b234a 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/SortingAtomicReaderTest.cs
@@ -79,5 +79,61 @@ namespace Lucene.Net.Index.Sorter
                 assertEquals("Cannot sort an index with a Sort that refers to the relevance score", e.Message);
             }
         }
+
+
+        #region SorterTestBase
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestBinaryDocValuesField()
+        {
+            base.TestBinaryDocValuesField();
+        }
+
+        [Test]
+        public override void TestDocsAndPositionsEnum()
+        {
+            base.TestDocsAndPositionsEnum();
+        }
+
+        [Test]
+        public override void TestDocsEnum()
+        {
+            base.TestDocsEnum();
+        }
+
+        [Test]
+        public override void TestNormValues()
+        {
+            base.TestNormValues();
+        }
+
+        [Test]
+        public override void TestNumericDocValuesField()
+        {
+            base.TestNumericDocValuesField();
+        }
+
+        [Test]
+        public override void TestSortedDocValuesField()
+        {
+            base.TestSortedDocValuesField();
+        }
+
+        [Test]
+        public override void TestSortedSetDocValuesField()
+        {
+            base.TestSortedSetDocValuesField();
+        }
+
+        [Test]
+        public override void TestTermVectors()
+        {
+            base.TestTermVectors();
+        }
+
+        #endregion
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs
index 37f00e2..9dcfcde 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestCompressionMode.cs
@@ -88,7 +88,7 @@ namespace Lucene.Net.Codecs.Compressing
             return Arrays.CopyOfRange(bytes.Bytes, bytes.Offset, bytes.Offset + bytes.Length);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDecompress()
         {
             int iterations = AtLeast(10);
@@ -103,7 +103,7 @@ namespace Lucene.Net.Codecs.Compressing
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestPartialDecompress()
         {
             int iterations = AtLeast(10);
@@ -139,19 +139,19 @@ namespace Lucene.Net.Codecs.Compressing
             return compressed;
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestEmptySequence()
         {
             Test(new byte[0]);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestShortSequence()
         {
             Test(new[] { (byte)Random().Next(256) });
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestIncompressible()
         {
             var decompressed = new byte[RandomInts.NextIntBetween(Random(), 20, 256)];
@@ -162,7 +162,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestConstant()
         {
             var decompressed = new byte[TestUtil.NextInt(Random(), 1, 10000)];
@@ -170,7 +170,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestLUCENE5201()
         {
             sbyte[] data = { 14, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 72, 14, 72, 14, 85, 3, 72, 14, 72, 14, 72, 14, 72, 14, 72, 14, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 50, 64, 0, 46, -1, 0, 0, 0, 29, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 50, 64, 0, 47, -105, 0, 0, 0, 30, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, -97, 6, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68
 , -113, 0, 120, 64, 0, 48, 4, 0, 0, 0, 31, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 24, 32, 34, 124, 0, 120, 64, 0, 48, 80, 0, 0, 0, 31, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 
 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 7
 2, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 50, 64, 0, 49, 20, 0, 0, 0, 32, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 50, 64, 0, 50, 53, 0, 0, 0, 34, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0
 , 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 50, 64, 0, 51, 85, 0, 0, 0, 36, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, -97, 5, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 50, -64, 0, 51, -45, 0, 0, 0, 37, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -9
 7, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 120, 64, 0, 52, -88, 0, 0, 0, 39, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, -19, -24, -101, -35 };

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs
index feb57d0..334ae8d 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs
@@ -88,7 +88,7 @@ namespace Lucene.Net.Codecs.Compressing
             return compressed;
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestShortLiteralsAndMatchs()
         {
             // literals and matchs lengths <= 15
@@ -96,7 +96,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestLongMatchs()
         {
             // match length >= 20
@@ -108,7 +108,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestLongLiterals()
         {
             // long literals (length >= 16) which are not the last literals
@@ -120,7 +120,7 @@ namespace Lucene.Net.Codecs.Compressing
             Test(decompressed);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestMatchRightBeforeLastLiterals()
         {
             Test(new byte[] { 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 5 });


[09/47] lucenenet git commit: Codecs.SimpleText.SimpleTextStoredFieldsWriter: Fixed formatting bugs that were causing loss of precision on float/double types when converting to string.

Posted by ni...@apache.org.
Codecs.SimpleText.SimpleTextStoredFieldsWriter: Fixed formatting bugs that were causing loss of precision on float/double types when converting to string.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/f5cebafd
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/f5cebafd
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/f5cebafd

Branch: refs/heads/master
Commit: f5cebafd057f4f7a59377ae68603892609982d0e
Parents: 450e647
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Oct 8 16:21:05 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sat Oct 8 17:15:42 2016 +0700

----------------------------------------------------------------------
 .../SimpleText/SimpleTextStoredFieldsWriter.cs         | 13 ++++++++-----
 .../Index/BaseStoredFieldsFormatTestCase.cs            |  2 +-
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f5cebafd/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
index 7f0fb50..ebfc9b5 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
@@ -19,6 +19,7 @@ namespace Lucene.Net.Codecs.SimpleText
 {
 
     using System;
+    using System.Globalization;
 
 	using FieldInfo = Index.FieldInfo;
 	using FieldInfos = Index.FieldInfos;
@@ -98,7 +99,7 @@ namespace Lucene.Net.Codecs.SimpleText
         public override void WriteField(FieldInfo info, IndexableField field)
         {
             Write(FIELD);
-            Write(Convert.ToString(info.Number));
+            Write(info.Number.ToString(CultureInfo.InvariantCulture));
             NewLine();
 
             Write(NAME);
@@ -117,7 +118,7 @@ namespace Lucene.Net.Codecs.SimpleText
                     NewLine();
 
                     Write(VALUE);
-                    Write(Convert.ToString((int) n));
+                    Write(((int)n).ToString(CultureInfo.InvariantCulture));
                     NewLine();
                 }
                 else if (n is long?)
@@ -126,7 +127,7 @@ namespace Lucene.Net.Codecs.SimpleText
                     NewLine();
 
                     Write(VALUE);
-                    Write(Convert.ToString((long) n));
+                    Write(((long)n).ToString(CultureInfo.InvariantCulture));
                     NewLine();
                 }
                 else if (n is float?)
@@ -135,7 +136,8 @@ namespace Lucene.Net.Codecs.SimpleText
                     NewLine();
 
                     Write(VALUE);
-                    Write(Convert.ToString((float) n));
+                    // LUCENENET: Need to specify the "R" for round-trip: http://stackoverflow.com/a/611564/181087
+                    Write(((float)n).ToString("R", CultureInfo.InvariantCulture));
                     NewLine();
                 }
                 else if (n is double?)
@@ -144,7 +146,8 @@ namespace Lucene.Net.Codecs.SimpleText
                     NewLine();
 
                     Write(VALUE);
-                    Write(Convert.ToString((double) n));
+                    // LUCENENET: Need to specify the "R" for round-trip: http://stackoverflow.com/a/611564/181087
+                    Write(((double)n).ToString("R", CultureInfo.InvariantCulture));
                     NewLine();
                 }
                 else

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f5cebafd/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
index 0b11f29..a63eb84 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
@@ -179,7 +179,7 @@ namespace Lucene.Net.Index
                         Document docExp = docs[testID];
                         for (int i = 0; i < fieldCount; i++)
                         {
-                            Assert.AreEqual("doc " + testID + ", field f" + fieldCount + " is wrong", docExp.Get("f" + i), doc.Get("f" + i));
+                            assertEquals("doc " + testID + ", field f" + fieldCount + " is wrong", docExp.Get("f" + i), doc.Get("f" + i));
                         }
                     }
                     r.Dispose();


[39/47] lucenenet git commit: HACK: Added stubs for all tests subclasses of abstract test classes (with [Test] attributes) and commented the [Test] attributes in the abstract classes to keep the tests from running in the wrong context.

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs
index bf0a5fe..cbf656c 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldDocValuesFormat.cs
@@ -153,5 +153,506 @@ namespace Lucene.Net.Codecs.Perfield
                 }
             }
         }
+
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs
index d2275e8..05751f9 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Perfield/TestPerFieldPostingsFormat.cs
@@ -45,5 +45,56 @@ namespace Lucene.Net.Codecs.Perfield
             //LUCENE TO-DO
             AssumeTrue("The MockRandom PF randomizes content on the fly, so we can't check it", false);
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
+
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs b/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
index 1efe781..3e92567 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDocValuesFormat.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Index
 {
     /*
@@ -38,5 +40,506 @@ namespace Lucene.Net.Index
         {
             return TestUtil.FieldSupportsHugeBinaryDocValues(field);
         }
+
+
+        #region BaseDocValuesFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestOneNumber()
+        {
+            base.TestOneNumber();
+        }
+
+        [Test]
+        public override void TestOneFloat()
+        {
+            base.TestOneFloat();
+        }
+
+        [Test]
+        public override void TestTwoNumbers()
+        {
+            base.TestTwoNumbers();
+        }
+
+        [Test]
+        public override void TestTwoBinaryValues()
+        {
+            base.TestTwoBinaryValues();
+        }
+
+        [Test]
+        public override void TestTwoFieldsMixed()
+        {
+            base.TestTwoFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed()
+        {
+            base.TestThreeFieldsMixed();
+        }
+
+        [Test]
+        public override void TestThreeFieldsMixed2()
+        {
+            base.TestThreeFieldsMixed2();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsNumeric()
+        {
+            base.TestTwoDocumentsNumeric();
+        }
+
+        [Test]
+        public override void TestTwoDocumentsMerged()
+        {
+            base.TestTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestBigNumericRange()
+        {
+            base.TestBigNumericRange();
+        }
+
+        [Test]
+        public override void TestBigNumericRange2()
+        {
+            base.TestBigNumericRange2();
+        }
+
+        [Test]
+        public override void TestBytes()
+        {
+            base.TestBytes();
+        }
+
+        [Test]
+        public override void TestBytesTwoDocumentsMerged()
+        {
+            base.TestBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedBytes()
+        {
+            base.TestSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocuments()
+        {
+            base.TestSortedBytesTwoDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesThreeDocuments()
+        {
+            base.TestSortedBytesThreeDocuments();
+        }
+
+        [Test]
+        public override void TestSortedBytesTwoDocumentsMerged()
+        {
+            base.TestSortedBytesTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedMergeAwayAllValues()
+        {
+            base.TestSortedMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestBytesWithNewline()
+        {
+            base.TestBytesWithNewline();
+        }
+
+        [Test]
+        public override void TestMissingSortedBytes()
+        {
+            base.TestMissingSortedBytes();
+        }
+
+        [Test]
+        public override void TestSortedTermsEnum()
+        {
+            base.TestSortedTermsEnum();
+        }
+
+        [Test]
+        public override void TestEmptySortedBytes()
+        {
+            base.TestEmptySortedBytes();
+        }
+
+        [Test]
+        public override void TestEmptyBytes()
+        {
+            base.TestEmptyBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalBytes()
+        {
+            base.TestVeryLargeButLegalBytes();
+        }
+
+        [Test]
+        public override void TestVeryLargeButLegalSortedBytes()
+        {
+            base.TestVeryLargeButLegalSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytes()
+        {
+            base.TestCodecUsesOwnBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytes()
+        {
+            base.TestCodecUsesOwnSortedBytes();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnBytesEachTime()
+        {
+            base.TestCodecUsesOwnBytesEachTime();
+        }
+
+        [Test]
+        public override void TestCodecUsesOwnSortedBytesEachTime()
+        {
+            base.TestCodecUsesOwnSortedBytesEachTime();
+        }
+
+        /*
+         * Simple test case to show how to use the API
+         */
+        [Test]
+        public override void TestDocValuesSimple()
+        {
+            base.TestDocValuesSimple();
+        }
+
+        [Test]
+        public override void TestRandomSortedBytes()
+        {
+            base.TestRandomSortedBytes();
+        }
+
+        [Test]
+        public override void TestBooleanNumericsVsStoredFields()
+        {
+            base.TestBooleanNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteNumericsVsStoredFields()
+        {
+            base.TestByteNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestByteMissingVsFieldCache()
+        {
+            base.TestByteMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestShortNumericsVsStoredFields()
+        {
+            base.TestShortNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestShortMissingVsFieldCache()
+        {
+            base.TestShortMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestIntNumericsVsStoredFields()
+        {
+            base.TestIntNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestIntMissingVsFieldCache()
+        {
+            base.TestIntMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestLongNumericsVsStoredFields()
+        {
+            base.TestLongNumericsVsStoredFields();
+        }
+
+        [Test]
+        public override void TestLongMissingVsFieldCache()
+        {
+            base.TestLongMissingVsFieldCache();
+        }
+
+        [Test]
+        public override void TestBinaryFixedLengthVsStoredFields()
+        {
+            base.TestBinaryFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestBinaryVariableLengthVsStoredFields()
+        {
+            base.TestBinaryVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsStoredFields()
+        {
+            base.TestSortedFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedFixedLengthVsFieldCache()
+        {
+            base.TestSortedFixedLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsFieldCache()
+        {
+            base.TestSortedVariableLengthVsFieldCache();
+        }
+
+        [Test]
+        public override void TestSortedVariableLengthVsStoredFields()
+        {
+            base.TestSortedVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetOneValue()
+        {
+            base.TestSortedSetOneValue();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoFields()
+        {
+            base.TestSortedSetTwoFields();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsMerged()
+        {
+            base.TestSortedSetTwoDocumentsMerged();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValues()
+        {
+            base.TestSortedSetTwoValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoValuesUnordered()
+        {
+            base.TestSortedSetTwoValuesUnordered();
+        }
+
+        [Test]
+        public override void TestSortedSetThreeValuesTwoDocs()
+        {
+            base.TestSortedSetThreeValuesTwoDocs();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissing()
+        {
+            base.TestSortedSetTwoDocumentsLastMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsLastMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsLastMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissing()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissing();
+        }
+
+        [Test]
+        public override void TestSortedSetTwoDocumentsFirstMissingMerge()
+        {
+            base.TestSortedSetTwoDocumentsFirstMissingMerge();
+        }
+
+        [Test]
+        public override void TestSortedSetMergeAwayAllValues()
+        {
+            base.TestSortedSetMergeAwayAllValues();
+        }
+
+        [Test]
+        public override void TestSortedSetTermsEnum()
+        {
+            base.TestSortedSetTermsEnum();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetFixedLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthSingleValuedVsStoredFields()
+        {
+            base.TestSortedSetVariableLengthSingleValuedVsStoredFields();
+        }
+
+        [Test]
+        public override void TestSortedSetFixedLengthVsUninvertedField()
+        {
+            base.TestSortedSetFixedLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestSortedSetVariableLengthVsUninvertedField()
+        {
+            base.TestSortedSetVariableLengthVsUninvertedField();
+        }
+
+        [Test]
+        public override void TestGCDCompression()
+        {
+            base.TestGCDCompression();
+        }
+
+        [Test]
+        public override void TestZeros()
+        {
+            base.TestZeros();
+        }
+
+        [Test]
+        public override void TestZeroOrMin()
+        {
+            base.TestZeroOrMin();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissing()
+        {
+            base.TestTwoNumbersOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoNumbersOneMissingWithMerging()
+        {
+            base.TestTwoNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeNumbersOneMissingWithMerging()
+        {
+            base.TestThreeNumbersOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissing()
+        {
+            base.TestTwoBytesOneMissing();
+        }
+
+        [Test]
+        public override void TestTwoBytesOneMissingWithMerging()
+        {
+            base.TestTwoBytesOneMissingWithMerging();
+        }
+
+        [Test]
+        public override void TestThreeBytesOneMissingWithMerging()
+        {
+            base.TestThreeBytesOneMissingWithMerging();
+        }
+
+        // LUCENE-4853
+        [Test]
+        public override void TestHugeBinaryValues()
+        {
+            base.TestHugeBinaryValues();
+        }
+
+        // TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
+        [Test]
+        public override void TestHugeBinaryValueLimit()
+        {
+            base.TestHugeBinaryValueLimit();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (binary/numeric/sorted, no missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads()
+        {
+            base.TestThreads();
+        }
+
+        /// <summary>
+        /// Tests dv against stored fields with threads (all types + missing)
+        /// </summary>
+        [Test]
+        public override void TestThreads2()
+        {
+            base.TestThreads2();
+        }
+
+        // LUCENE-5218
+        [Test]
+        public override void TestEmptyBinaryValueOnPageSizes()
+        {
+            base.TestEmptyBinaryValueOnPageSizes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs b/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs
index e99678b..921b719 100644
--- a/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestLogMergePolicy.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Index
 {
     /*
@@ -23,5 +25,18 @@ namespace Lucene.Net.Index
         {
             return NewLogMergePolicy(Random());
         }
+
+        #region BaseMergePolicyTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestForceMergeNotNeeded()
+        {
+            base.TestForceMergeNotNeeded();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs b/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
index add43b4..5661c05 100644
--- a/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestNumericDocValuesUpdates.cs
@@ -1527,7 +1527,7 @@ namespace Lucene.Net.Index
             dir.Dispose();
         }
 
-        [Test]
+        [Test, Timeout(120000)]
         public virtual void TestTonsOfUpdates()
         {
             // LUCENE-5248: make sure that when there are many updates, we don't use too much RAM

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs b/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs
index 70c47cc..7d49c1b 100644
--- a/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestPersistentSnapshotDeletionPolicy.cs
@@ -208,5 +208,55 @@ namespace Lucene.Net.Index
             Assert.AreEqual(0, psdp.SnapshotCount, "Should have no snapshots !");
             dir.Dispose();
         }
+
+
+        #region TestSnapshotDeletionPolicy
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestSnapshotDeletionPolicy_Mem()
+        {
+            base.TestSnapshotDeletionPolicy_Mem();
+        }
+
+        [Test]
+        public override void TestBasicSnapshots()
+        {
+            base.TestBasicSnapshots();
+        }
+
+        [Test]
+        public override void TestMultiThreadedSnapshotting()
+        {
+            base.TestMultiThreadedSnapshotting();
+        }
+
+        [Test]
+        public override void TestRollbackToOldSnapshot()
+        {
+            base.TestRollbackToOldSnapshot();
+        }
+
+        [Test]
+        public override void TestReleaseSnapshot()
+        {
+            base.TestReleaseSnapshot();
+        }
+
+        [Test]
+        public override void TestSnapshotLastCommitTwice()
+        {
+            base.TestSnapshotLastCommitTwice();
+        }
+
+        [Test]
+        public override void TestMissingCommits()
+        {
+            base.TestMissingCommits();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs b/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs
index 427aa96..20c6b07 100644
--- a/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestPostingsFormat.cs
@@ -41,5 +41,55 @@ namespace Lucene.Net.Index
         {
             AssumeTrue("The MockRandom PF randomizes content on the fly, so we can't check it", false);
         }
+
+
+        #region BasePostingsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestDocsOnly()
+        {
+            base.TestDocsOnly();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqs()
+        {
+            base.TestDocsAndFreqs();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositions()
+        {
+            base.TestDocsAndFreqsAndPositions();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndPayloads();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsets()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsets();
+        }
+
+        [Test]
+        public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads()
+        {
+            base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs b/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs
index 902db7f..31ed10c 100644
--- a/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestStoredFieldsFormat.cs
@@ -47,5 +47,88 @@ namespace Lucene.Net.Index
             // and merge into newly formed 3.x segments.
             base.TestWriteReadMerge();
         }
+
+
+        #region BaseStoredFieldsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestRandomStoredFields()
+        {
+            base.TestRandomStoredFields();
+        }
+
+        [Test]
+        // LUCENE-1727: make sure doc fields are stored in order
+        public override void TestStoredFieldsOrder()
+        {
+            base.TestStoredFieldsOrder();
+        }
+
+        [Test]
+        // LUCENE-1219
+        public override void TestBinaryFieldOffsetLength()
+        {
+            base.TestBinaryFieldOffsetLength();
+        }
+
+        [Test]
+        public override void TestNumericField()
+        {
+            base.TestNumericField();
+        }
+
+        [Test]
+        public override void TestIndexedBit()
+        {
+            base.TestIndexedBit();
+        }
+
+        [Test]
+        public override void TestReadSkip()
+        {
+            base.TestReadSkip();
+        }
+
+        [Test]
+        public override void TestEmptyDocs()
+        {
+            base.TestEmptyDocs();
+        }
+
+        [Test]
+        public override void TestConcurrentReads()
+        {
+            base.TestConcurrentReads();
+        }
+
+        [Test, Timeout(120000)]
+        public override void TestBigDocuments()
+        {
+            base.TestBigDocuments();
+        }
+
+        [Test]
+        public override void TestBulkMergeWithDeletes()
+        {
+            base.TestBulkMergeWithDeletes();
+        }
+
+        #endregion
+
+        #region BaseIndexFileFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestMergeStability()
+        {
+            base.TestMergeStability();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs b/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs
index 38f08d4..dac8fa8 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTermVectorsFormat.cs
@@ -58,5 +58,60 @@ namespace Lucene.Net.Index
         {
             AssumeTrue("The MockRandom PF randomizes content on the fly, so we can't check it", false);
         }
+
+
+
+        #region BaseTermVectorsFormatTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        // only one doc with vectors
+        public override void TestRareVectors()
+        {
+            base.TestRareVectors();
+        }
+
+        [Test]
+        public override void TestHighFreqs()
+        {
+            base.TestHighFreqs();
+        }
+
+        [Test]
+        public override void TestLotsOfFields()
+        {
+            base.TestLotsOfFields();
+        }
+
+        [Test]
+        // different options for the same field
+        public override void TestMixedOptions()
+        {
+            base.TestMixedOptions();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestMerge()
+        {
+            base.TestMerge();
+        }
+
+        [Test]
+        // run random tests from different threads to make sure the per-thread clones
+        // don't share mutable data
+        public override void TestClone()
+        {
+            base.TestClone();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs b/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
index 5dc9b6c..ce0acda 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
@@ -272,5 +272,19 @@ namespace Lucene.Net.Index
 
             // TODO: Add more checks for other non-double setters!
         }
+
+
+        #region BaseMergePolicyTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestForceMergeNotNeeded()
+        {
+            base.TestForceMergeNotNeeded();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs b/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs
index 96ec2f4..16a6d17 100644
--- a/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/BaseTestRangeFilter.cs
@@ -192,7 +192,7 @@ namespace Lucene.Net.Search
             }
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestPad()
         {
             int[] tests = new int[] { -9999999, -99560, -100, -3, -1, 0, 3, 9, 10, 1000, 999999999 };

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs b/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs
index 735dc0c..307c51f 100644
--- a/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs
+++ b/src/Lucene.Net.Tests/core/Search/Spans/TestSpanExplanationsOfNonMatches.cs
@@ -33,5 +33,219 @@ namespace Lucene.Net.Search.Spans
         {
             CheckHits.CheckNoMatchExplanations(q, FIELD, Searcher, expDocNrs);
         }
+
+
+        #region TestSpanExplanations
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestST1()
+        {
+            base.TestST1();
+        }
+
+        [Test]
+        public override void TestST2()
+        {
+            base.TestST2();
+        }
+
+        [Test]
+        public override void TestST4()
+        {
+            base.TestST4();
+        }
+
+        [Test]
+        public override void TestST5()
+        {
+            base.TestST5();
+        }
+
+        /* some SpanFirstQueries */
+
+        [Test]
+        public override void TestSF1()
+        {
+            base.TestSF1();
+        }
+
+        [Test]
+        public override void TestSF2()
+        {
+            base.TestSF2();
+        }
+
+        [Test]
+        public override void TestSF4()
+        {
+            base.TestSF4();
+        }
+
+        [Test]
+        public override void TestSF5()
+        {
+            base.TestSF5();
+        }
+
+        [Test]
+        public override void TestSF6()
+        {
+            base.TestSF6();
+        }
+
+        /* some SpanOrQueries */
+
+        [Test]
+        public override void TestSO1()
+        {
+            base.TestSO1();
+        }
+
+        [Test]
+        public override void TestSO2()
+        {
+            base.TestSO2();
+        }
+
+        [Test]
+        public override void TestSO3()
+        {
+            base.TestSO3();
+        }
+
+        [Test]
+        public override void TestSO4()
+        {
+            base.TestSO4();
+        }
+
+        /* some SpanNearQueries */
+
+        [Test]
+        public override void TestSNear1()
+        {
+            base.TestSNear1();
+        }
+
+        [Test]
+        public override void TestSNear2()
+        {
+            base.TestSNear2();
+        }
+
+        [Test]
+        public override void TestSNear3()
+        {
+            base.TestSNear3();
+        }
+
+        [Test]
+        public override void TestSNear4()
+        {
+            base.TestSNear4();
+        }
+
+        [Test]
+        public override void TestSNear5()
+        {
+            base.TestSNear5();
+        }
+
+        [Test]
+        public override void TestSNear6()
+        {
+            base.TestSNear6();
+        }
+
+        [Test]
+        public override void TestSNear7()
+        {
+            base.TestSNear7();
+        }
+
+        [Test]
+        public override void TestSNear8()
+        {
+            base.TestSNear8();
+        }
+
+        [Test]
+        public override void TestSNear9()
+        {
+            base.TestSNear9();
+        }
+
+        [Test]
+        public override void TestSNear10()
+        {
+            base.TestSNear10();
+        }
+
+        [Test]
+        public override void TestSNear11()
+        {
+            base.TestSNear11();
+        }
+
+        /* some SpanNotQueries */
+
+        [Test]
+        public override void TestSNot1()
+        {
+            base.TestSNot1();
+        }
+
+        [Test]
+        public override void TestSNot2()
+        {
+            base.TestSNot2();
+        }
+
+        [Test]
+        public override void TestSNot4()
+        {
+            base.TestSNot4();
+        }
+
+        [Test]
+        public override void TestSNot5()
+        {
+            base.TestSNot5();
+        }
+
+        [Test]
+        public override void TestSNot7()
+        {
+            base.TestSNot7();
+        }
+
+        [Test]
+        public override void TestSNot10()
+        {
+            base.TestSNot10();
+        }
+
+        #endregion
+
+        #region TestExplanations
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+
+        /// <summary>
+        /// Placeholder: JUnit freaks if you don't have one test ... making
+        /// class abstract doesn't help
+        /// </summary>
+        [Test]
+        public override void TestNoop()
+        {
+            base.TestNoop();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs b/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs
index fbfe049..18a2759 100644
--- a/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestComplexExplanationsOfNonMatches.cs
@@ -33,5 +33,165 @@ namespace Lucene.Net.Search
         {
             CheckHits.CheckNoMatchExplanations(q, FIELD, Searcher, expDocNrs);
         }
+
+
+        #region TestComplexExplanations
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void Test1()
+        {
+            base.Test1();
+        }
+
+        [Test]
+        public override void Test2()
+        {
+            base.Test2();
+        }
+
+        // :TODO: we really need more crazy complex cases.
+
+        // //////////////////////////////////////////////////////////////////
+
+        // The rest of these aren't that complex, but they are <i>somewhat</i>
+        // complex, and they expose weakness in dealing with queries that match
+        // with scores of 0 wrapped in other queries
+
+        [Test]
+        public override void TestT3()
+        {
+            base.TestT3();
+        }
+
+        [Test]
+        public override void TestMA3()
+        {
+            base.TestMA3();
+        }
+
+        [Test]
+        public override void TestFQ5()
+        {
+            base.TestFQ5();
+        }
+
+        [Test]
+        public override void TestCSQ4()
+        {
+            base.TestCSQ4();
+        }
+
+        [Test]
+        public override void TestDMQ10()
+        {
+            base.TestDMQ10();
+        }
+
+        [Test]
+        public override void TestMPQ7()
+        {
+            base.TestMPQ7();
+        }
+
+        [Test]
+        public override void TestBQ12()
+        {
+            base.TestBQ12();
+        }
+
+        [Test]
+        public override void TestBQ13()
+        {
+            base.TestBQ13();
+        }
+
+        [Test]
+        public override void TestBQ18()
+        {
+            base.TestBQ18();
+        }
+
+        [Test]
+        public override void TestBQ21()
+        {
+            base.TestBQ21();
+        }
+
+        [Test]
+        public override void TestBQ22()
+        {
+            base.TestBQ22();
+        }
+
+        [Test]
+        public override void TestST3()
+        {
+            base.TestST3();
+        }
+
+        [Test]
+        public override void TestST6()
+        {
+            base.TestST6();
+        }
+
+        [Test]
+        public override void TestSF3()
+        {
+            base.TestSF3();
+        }
+
+        [Test]
+        public override void TestSF7()
+        {
+            base.TestSF7();
+        }
+
+        [Test]
+        public override void TestSNot3()
+        {
+            base.TestSNot3();
+        }
+
+        [Test]
+        public override void TestSNot6()
+        {
+            base.TestSNot6();
+        }
+
+        [Test]
+        public override void TestSNot8()
+        {
+            base.TestSNot8();
+        }
+
+        [Test]
+        public override void TestSNot9()
+        {
+            base.TestSNot9();
+        }
+
+        #endregion
+
+        #region TestExplanations
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+
+        /// <summary>
+        /// Placeholder: JUnit freaks if you don't have one test ... making
+        /// class abstract doesn't help
+        /// </summary>
+        [Test]
+        public override void TestNoop()
+        {
+            base.TestNoop();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Search/TestExplanations.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestExplanations.cs b/src/Lucene.Net.Tests/core/Search/TestExplanations.cs
index a528615..18962f9 100644
--- a/src/Lucene.Net.Tests/core/Search/TestExplanations.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestExplanations.cs
@@ -261,7 +261,7 @@ namespace Lucene.Net.Search
         /// Placeholder: JUnit freaks if you don't have one test ... making
         /// class abstract doesn't help
         /// </summary>
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestNoop()
         {
             /* NOOP */

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
index 1acffbd..0a8452b 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
@@ -566,5 +566,19 @@ namespace Lucene.Net.Search
             reader.Dispose();
             dir.Dispose();
         }
+
+
+        #region SorterTestBase
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestPad()
+        {
+            base.TestPad();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs
index 0fc6843..1b923a3 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRewriteMethod.cs
@@ -60,5 +60,22 @@ namespace Lucene.Net.Search
             Assert.IsFalse(a1.Equals(b));
             QueryUtils.Check(a1);
         }
+
+
+
+        #region TestSnapshotDeletionPolicy
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// test a bunch of random regular expressions </summary>
+        [Test, Timeout(60000)]
+        public override void TestRegexps()
+        {
+            base.TestRegexps();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs b/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
index f52d360..7f95d2a 100644
--- a/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
@@ -551,5 +551,19 @@ namespace Lucene.Net.Search
             result = search.Search(Csrq("rand", maxRP, null, T, F), null, numDocs).ScoreDocs;
             AssertEquals("max,nul,T,T", 1, result.Length);
         }
+
+
+        #region SorterTestBase
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestPad()
+        {
+            base.TestPad();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs b/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
index 6b45673..ee990c1 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
@@ -33,5 +33,457 @@ namespace Lucene.Net.Search
         {
             CheckHits.CheckNoMatchExplanations(q, FIELD, Searcher, expDocNrs);
         }
+
+
+        #region TestSimpleExplanations
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestT1()
+        {
+            base.TestT1();
+        }
+
+        [Test]
+        public override void TestT2()
+        {
+            base.TestT2();
+        }
+
+        /* MatchAllDocs */
+
+        [Test]
+        public override void TestMA1()
+        {
+            base.TestMA1();
+        }
+
+        [Test]
+        public override void TestMA2()
+        {
+            base.TestMA2();
+        }
+
+        /* some simple phrase tests */
+
+        [Test]
+        public override void TestP1()
+        {
+            base.TestP1();
+        }
+
+        [Test]
+        public override void TestP2()
+        {
+            base.TestP2();
+        }
+
+        [Test]
+        public override void TestP3()
+        {
+            base.TestP3();
+        }
+
+        [Test]
+        public override void TestP4()
+        {
+            base.TestP4();
+        }
+
+        [Test]
+        public override void TestP5()
+        {
+            base.TestP5();
+        }
+
+        [Test]
+        public override void TestP6()
+        {
+            base.TestP6();
+        }
+
+        [Test]
+        public override void TestP7()
+        {
+            base.TestP7();
+        }
+
+        /* some simple filtered query tests */
+
+        [Test]
+        public override void TestFQ1()
+        {
+            base.TestFQ1();
+        }
+
+        [Test]
+        public override void TestFQ2()
+        {
+            base.TestFQ2();
+        }
+
+        [Test]
+        public override void TestFQ3()
+        {
+            base.TestFQ3();
+        }
+
+        [Test]
+        public override void TestFQ4()
+        {
+            base.TestFQ4();
+        }
+
+        [Test]
+        public override void TestFQ6()
+        {
+            base.TestFQ6();
+        }
+
+        /* ConstantScoreQueries */
+
+        [Test]
+        public override void TestCSQ1()
+        {
+            base.TestCSQ1();
+        }
+
+        [Test]
+        public override void TestCSQ2()
+        {
+            base.TestCSQ2();
+        }
+
+        [Test]
+        public override void TestCSQ3()
+        {
+            base.TestCSQ3();
+        }
+
+        /* DisjunctionMaxQuery */
+
+        [Test]
+        public override void TestDMQ1()
+        {
+            base.TestDMQ1();
+        }
+
+        [Test]
+        public override void TestDMQ2()
+        {
+            base.TestDMQ2();
+        }
+
+        [Test]
+        public override void TestDMQ3()
+        {
+            base.TestDMQ3();
+        }
+
+        [Test]
+        public override void TestDMQ4()
+        {
+            base.TestDMQ4();
+        }
+
+        [Test]
+        public override void TestDMQ5()
+        {
+            base.TestDMQ5();
+        }
+
+        [Test]
+        public override void TestDMQ6()
+        {
+            base.TestDMQ6();
+        }
+
+        [Test]
+        public override void TestDMQ7()
+        {
+            base.TestDMQ7();
+        }
+
+        [Test]
+        public override void TestDMQ8()
+        {
+            base.TestDMQ8();
+        }
+
+        [Test]
+        public override void TestDMQ9()
+        {
+            base.TestDMQ9();
+        }
+
+        /* MultiPhraseQuery */
+
+        [Test]
+        public override void TestMPQ1()
+        {
+            base.TestMPQ1();
+        }
+
+        [Test]
+        public override void TestMPQ2()
+        {
+            base.TestMPQ2();
+        }
+
+        [Test]
+        public override void TestMPQ3()
+        {
+            base.TestMPQ3();
+        }
+
+        [Test]
+        public override void TestMPQ4()
+        {
+            base.TestMPQ4();
+        }
+
+        [Test]
+        public override void TestMPQ5()
+        {
+            base.TestMPQ5();
+        }
+
+        [Test]
+        public override void TestMPQ6()
+        {
+            base.TestMPQ6();
+        }
+
+        /* some simple tests of boolean queries containing term queries */
+
+        [Test]
+        public override void TestBQ1()
+        {
+            base.TestBQ1();
+        }
+
+        [Test]
+        public override void TestBQ2()
+        {
+            base.TestBQ2();
+        }
+
+        [Test]
+        public override void TestBQ3()
+        {
+            base.TestBQ3();
+        }
+
+        [Test]
+        public override void TestBQ4()
+        {
+            base.TestBQ4();
+        }
+
+        [Test]
+        public override void TestBQ5()
+        {
+            base.TestBQ5();
+        }
+
+        [Test]
+        public override void TestBQ6()
+        {
+            base.TestBQ6();
+        }
+
+        [Test]
+        public override void TestBQ7()
+        {
+            base.TestBQ7();
+        }
+
+        [Test]
+        public override void TestBQ8()
+        {
+            base.TestBQ8();
+        }
+
+        [Test]
+        public override void TestBQ9()
+        {
+            base.TestBQ9();
+        }
+
+        [Test]
+        public override void TestBQ10()
+        {
+            base.TestBQ10();
+        }
+
+        [Test]
+        public override void TestBQ11()
+        {
+            base.TestBQ11();
+        }
+
+        [Test]
+        public override void TestBQ14()
+        {
+            base.TestBQ14();
+        }
+
+        [Test]
+        public override void TestBQ15()
+        {
+            base.TestBQ15();
+        }
+
+        [Test]
+        public override void TestBQ16()
+        {
+            base.TestBQ16();
+        }
+
+        [Test]
+        public override void TestBQ17()
+        {
+            base.TestBQ17();
+        }
+
+        [Test]
+        public override void TestBQ19()
+        {
+            base.TestBQ19();
+        }
+
+        [Test]
+        public override void TestBQ20()
+        {
+            base.TestBQ20();
+        }
+
+        /* BQ of TQ: using alt so some fields have zero boost and some don't */
+
+        [Test]
+        public override void TestMultiFieldBQ1()
+        {
+            base.TestMultiFieldBQ1();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ2()
+        {
+            base.TestMultiFieldBQ2();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ3()
+        {
+            base.TestMultiFieldBQ3();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ4()
+        {
+            base.TestMultiFieldBQ4();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ5()
+        {
+            base.TestMultiFieldBQ5();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ6()
+        {
+            base.TestMultiFieldBQ6();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ7()
+        {
+            base.TestMultiFieldBQ7();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ8()
+        {
+            base.TestMultiFieldBQ8();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ9()
+        {
+            base.TestMultiFieldBQ9();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQ10()
+        {
+            base.TestMultiFieldBQ10();
+        }
+
+        /* BQ of PQ: using alt so some fields have zero boost and some don't */
+
+        [Test]
+        public override void TestMultiFieldBQofPQ1()
+        {
+            base.TestMultiFieldBQofPQ1();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQofPQ2()
+        {
+            base.TestMultiFieldBQofPQ2();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQofPQ3()
+        {
+            base.TestMultiFieldBQofPQ3();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQofPQ4()
+        {
+            base.TestMultiFieldBQofPQ4();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQofPQ5()
+        {
+            base.TestMultiFieldBQofPQ5();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQofPQ6()
+        {
+            base.TestMultiFieldBQofPQ6();
+        }
+
+        [Test]
+        public override void TestMultiFieldBQofPQ7()
+        {
+            base.TestMultiFieldBQofPQ7();
+        }
+
+        #endregion
+
+        #region TestExplanations
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+
+        /// <summary>
+        /// Placeholder: JUnit freaks if you don't have one test ... making
+        /// class abstract doesn't help
+        /// </summary>
+        [Test]
+        public override void TestNoop()
+        {
+            base.TestNoop();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs b/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
index bb1c4d0..f8c9fb3 100644
--- a/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
@@ -177,5 +177,19 @@ namespace Lucene.Net.Search
             result = search.Search(q, TermRangeFilter.NewStringRange("rand", maxRP, null, T, F), numDocs).ScoreDocs;
             Assert.AreEqual(1, result.Length, "max,nul,T,T");
         }
+
+
+        #region SorterTestBase
+        // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestPad()
+        {
+            base.TestPad();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs b/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
index dd31909..51ac7e2 100644
--- a/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
+++ b/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
@@ -153,55 +153,55 @@ namespace Lucene.Net.Util
             DoTest(strategy, Random().Next(20000));
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestEmpty()
         {
             SortTest(new Entry[0]);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestOne()
         {
             DoTest(RandomStrategy, 1);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestTwo()
         {
             DoTest(RandomStrategy, 2);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestRandom()
         {
             DoTest(RandomStrategy);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestRandomLowCardinality()
         {
             DoTest(RandomLowCardinalityStrategy, 2);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestAscending()
         {
             DoTest(AscendingStrategy, 2);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestAscendingSequences()
         {
             DoTest(AscendingSequencesStrategy, 2);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestDescending()
         {
             DoTest(DescendingStrategy, 2);
         }
 
-        [Test]
+        // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
         public virtual void TestStrictlyDescendingStrategy()
         {
             DoTest(StrictlyDescendingStrategy, 2);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs b/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
index 91c7062..38d63a1 100644
--- a/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Support;
+using NUnit.Framework;
 using System.Collections;
 using System.Diagnostics;
 
@@ -75,5 +76,49 @@ namespace Lucene.Net.Util.Packed
                 return SlowAdvance(target);
             }
         }
+
+
+        #region BaseDocIdSetTestCase<T>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// Test length=0.
+        /// </summary>
+        [Test]
+        public override void TestNoBit()
+        {
+            base.TestNoBit();
+        }
+
+        /// <summary>
+        /// Test length=1.
+        /// </summary>
+        [Test]
+        public override void Test1Bit()
+        {
+            base.Test1Bit();
+        }
+
+        /// <summary>
+        /// Test length=2.
+        /// </summary>
+        [Test]
+        public override void Test2Bits()
+        {
+            base.Test2Bits();
+        }
+
+        /// <summary>
+        /// Compare the content of the set against a <seealso cref="BitSet"/>.
+        /// </summary>
+        [Test]
+        public override void TestAgainstBitSet()
+        {
+            base.TestAgainstBitSet();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
index 1294bff..bb779c5 100644
--- a/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
@@ -1,3 +1,5 @@
+using Lucene.Net.Attributes;
+using NUnit.Framework;
 using System.Collections;
 
 namespace Lucene.Net.Util
@@ -25,5 +27,49 @@ namespace Lucene.Net.Util
         {
             return new DocIdBitSet((BitArray)bs.Clone());
         }
+
+
+        #region BaseDocIdSetTestCase<T>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// Test length=0.
+        /// </summary>
+        [Test]
+        public override void TestNoBit()
+        {
+            base.TestNoBit();
+        }
+
+        /// <summary>
+        /// Test length=1.
+        /// </summary>
+        [Test]
+        public override void Test1Bit()
+        {
+            base.Test1Bit();
+        }
+
+        /// <summary>
+        /// Test length=2.
+        /// </summary>
+        [Test]
+        public override void Test2Bits()
+        {
+            base.Test2Bits();
+        }
+
+        /// <summary>
+        /// Compare the content of the set against a <seealso cref="BitSet"/>.
+        /// </summary>
+        [Test, LongRunningTest, Timeout(150000)]
+        public override void TestAgainstBitSet()
+        {
+            base.TestAgainstBitSet();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
index aac033c..a62569d 100644
--- a/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
@@ -1,4 +1,5 @@
 using System;
+using Lucene.Net.Attributes;
 using Lucene.Net.Randomized.Generators;
 using Lucene.Net.Support;
 using NUnit.Framework;
@@ -510,5 +511,49 @@ namespace Lucene.Net.Util
             Assert.IsTrue(bits.Get(1));
             Assert.IsFalse(newBits.Get(1));
         }
+
+
+        #region BaseDocIdSetTestCase<T>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// Test length=0.
+        /// </summary>
+        [Test]
+        public override void TestNoBit()
+        {
+            base.TestNoBit();
+        }
+
+        /// <summary>
+        /// Test length=1.
+        /// </summary>
+        [Test]
+        public override void Test1Bit()
+        {
+            base.Test1Bit();
+        }
+
+        /// <summary>
+        /// Test length=2.
+        /// </summary>
+        [Test]
+        public override void Test2Bits()
+        {
+            base.Test2Bits();
+        }
+
+        /// <summary>
+        /// Compare the content of the set against a <seealso cref="BitSet"/>.
+        /// </summary>
+        [Test, LongRunningTest, Timeout(150000)]
+        public override void TestAgainstBitSet()
+        {
+            base.TestAgainstBitSet();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs b/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
index 5c35706..3649531 100644
--- a/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Util
 {
     /*
@@ -32,5 +34,67 @@ namespace Lucene.Net.Util
         {
             return new ArrayInPlaceMergeSorter<Entry>(arr, ArrayUtil.naturalComparator<Entry>());
         }
+
+
+        #region BaseSortTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestEmpty()
+        {
+            base.TestEmpty();
+        }
+
+        [Test]
+        public override void TestOne()
+        {
+            base.TestOne();
+        }
+
+        [Test]
+        public override void TestTwo()
+        {
+            base.TestTwo();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestRandomLowCardinality()
+        {
+            base.TestRandomLowCardinality();
+        }
+
+        [Test]
+        public override void TestAscending()
+        {
+            base.TestAscending();
+        }
+
+        [Test]
+        public override void TestAscendingSequences()
+        {
+            base.TestAscendingSequences();
+        }
+
+        [Test]
+        public override void TestDescending()
+        {
+            base.TestDescending();
+        }
+
+        [Test]
+        public override void TestStrictlyDescendingStrategy()
+        {
+            base.TestStrictlyDescendingStrategy();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs b/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
index c71893a..b2c75f8 100644
--- a/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Util
 {
     /*
@@ -28,5 +30,67 @@ namespace Lucene.Net.Util
         {
             return new ArrayIntroSorter<Entry>(arr, ArrayUtil.naturalComparator<Entry>());
         }
+
+
+        #region BaseSortTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestEmpty()
+        {
+            base.TestEmpty();
+        }
+
+        [Test]
+        public override void TestOne()
+        {
+            base.TestOne();
+        }
+
+        [Test]
+        public override void TestTwo()
+        {
+            base.TestTwo();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestRandomLowCardinality()
+        {
+            base.TestRandomLowCardinality();
+        }
+
+        [Test]
+        public override void TestAscending()
+        {
+            base.TestAscending();
+        }
+
+        [Test]
+        public override void TestAscendingSequences()
+        {
+            base.TestAscendingSequences();
+        }
+
+        [Test]
+        public override void TestDescending()
+        {
+            base.TestDescending();
+        }
+
+        [Test]
+        public override void TestStrictlyDescendingStrategy()
+        {
+            base.TestStrictlyDescendingStrategy();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
index 6e67b71..ae5afd7 100644
--- a/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
@@ -514,5 +514,49 @@ namespace Lucene.Net.Util
             bits.FastSet(bit - 1);
             Assert.IsTrue(bits.FastGet(bit - 1));
         }
+
+
+        #region BaseDocIdSetTestCase<T>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// Test length=0.
+        /// </summary>
+        [Test]
+        public override void TestNoBit()
+        {
+            base.TestNoBit();
+        }
+
+        /// <summary>
+        /// Test length=1.
+        /// </summary>
+        [Test]
+        public override void Test1Bit()
+        {
+            base.Test1Bit();
+        }
+
+        /// <summary>
+        /// Test length=2.
+        /// </summary>
+        [Test]
+        public override void Test2Bits()
+        {
+            base.Test2Bits();
+        }
+
+        /// <summary>
+        /// Compare the content of the set against a <seealso cref="BitSet"/>.
+        /// </summary>
+        [Test, LongRunningTest, Timeout(150000)]
+        public override void TestAgainstBitSet()
+        {
+            base.TestAgainstBitSet();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs b/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
index 3c92150..b310b7b 100644
--- a/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
@@ -38,5 +38,49 @@ namespace Lucene.Net.Util
             base.AssertEquals(numBits, ds1, ds2);
             Assert.AreEqual(ds1.Cardinality(), ds2.Cardinality());
         }
+
+
+        #region BaseDocIdSetTestCase<T>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// Test length=0.
+        /// </summary>
+        [Test]
+        public override void TestNoBit()
+        {
+            base.TestNoBit();
+        }
+
+        /// <summary>
+        /// Test length=1.
+        /// </summary>
+        [Test]
+        public override void Test1Bit()
+        {
+            base.Test1Bit();
+        }
+
+        /// <summary>
+        /// Test length=2.
+        /// </summary>
+        [Test]
+        public override void Test2Bits()
+        {
+            base.Test2Bits();
+        }
+
+        /// <summary>
+        /// Compare the content of the set against a <seealso cref="BitSet"/>.
+        /// </summary>
+        [Test]
+        public override void TestAgainstBitSet()
+        {
+            base.TestAgainstBitSet();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs b/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
index c12b850..8f13308 100644
--- a/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
 namespace Lucene.Net.Util
 {
     /*
@@ -28,5 +30,67 @@ namespace Lucene.Net.Util
         {
             return new ArrayTimSorter<Entry>(arr, ArrayUtil.naturalComparator<Entry>(), TestUtil.NextInt(Random(), 0, arr.Length));
         }
+
+
+        #region BaseSortTestCase
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        [Test]
+        public override void TestEmpty()
+        {
+            base.TestEmpty();
+        }
+
+        [Test]
+        public override void TestOne()
+        {
+            base.TestOne();
+        }
+
+        [Test]
+        public override void TestTwo()
+        {
+            base.TestTwo();
+        }
+
+        [Test]
+        public override void TestRandom()
+        {
+            base.TestRandom();
+        }
+
+        [Test]
+        public override void TestRandomLowCardinality()
+        {
+            base.TestRandomLowCardinality();
+        }
+
+        [Test]
+        public override void TestAscending()
+        {
+            base.TestAscending();
+        }
+
+        [Test]
+        public override void TestAscendingSequences()
+        {
+            base.TestAscendingSequences();
+        }
+
+        [Test]
+        public override void TestDescending()
+        {
+            base.TestDescending();
+        }
+
+        [Test]
+        public override void TestStrictlyDescendingStrategy()
+        {
+            base.TestStrictlyDescendingStrategy();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a79edea/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs b/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
index 73d338d..b0d3ea0 100644
--- a/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
@@ -106,5 +106,49 @@ namespace Lucene.Net.Util
             }
             AssertEquals(numBits, expected, union);
         }
+
+
+        #region BaseDocIdSetTestCase<T>
+        // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+        // context in Visual Studio. This fixes that with the minimum amount of code necessary
+        // to run them in the correct context without duplicating all of the tests.
+
+        /// <summary>
+        /// Test length=0.
+        /// </summary>
+        [Test]
+        public override void TestNoBit()
+        {
+            base.TestNoBit();
+        }
+
+        /// <summary>
+        /// Test length=1.
+        /// </summary>
+        [Test]
+        public override void Test1Bit()
+        {
+            base.Test1Bit();
+        }
+
+        /// <summary>
+        /// Test length=2.
+        /// </summary>
+        [Test]
+        public override void Test2Bits()
+        {
+            base.Test2Bits();
+        }
+
+        /// <summary>
+        /// Compare the content of the set against a <seealso cref="BitSet"/>.
+        /// </summary>
+        [Test]
+        public override void TestAgainstBitSet()
+        {
+            base.TestAgainstBitSet();
+        }
+
+        #endregion
     }
 }
\ No newline at end of file


[22/47] lucenenet git commit: Added Codecs.Bloom tests + mocks to the project

Posted by ni...@apache.org.
Added Codecs.Bloom tests + mocks to the project


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/c5d44a5b
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/c5d44a5b
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/c5d44a5b

Branch: refs/heads/master
Commit: c5d44a5b770fa7acdcbb9581858b880e5359b52c
Parents: aff260f
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 10 23:57:29 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:22 2016 +0700

----------------------------------------------------------------------
 .../Bloom/TestBloomFilteredLucene41Postings.cs  | 68 ++++++++++++++++++++
 .../Lucene.Net.TestFramework.csproj             |  1 +
 .../Bloom/TestBloomPostingsFormat.cs            | 41 ++++++------
 .../Lucene.Net.Tests.Codecs.csproj              |  1 +
 4 files changed, 90 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c5d44a5b/src/Lucene.Net.TestFramework/Codecs/Bloom/TestBloomFilteredLucene41Postings.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/Bloom/TestBloomFilteredLucene41Postings.cs b/src/Lucene.Net.TestFramework/Codecs/Bloom/TestBloomFilteredLucene41Postings.cs
new file mode 100644
index 0000000..78073b0
--- /dev/null
+++ b/src/Lucene.Net.TestFramework/Codecs/Bloom/TestBloomFilteredLucene41Postings.cs
@@ -0,0 +1,68 @@
+\ufeffusing Lucene.Net.Codecs.Lucene41;
+using Lucene.Net.Index;
+
+namespace Lucene.Net.Codecs.Bloom
+{
+    /**
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    /// <summary>
+    /// A class used for testing {@link BloomFilteringPostingsFormat} with a concrete
+    /// delegate (Lucene41). Creates a Bloom filter on ALL fields and with tiny
+    /// amounts of memory reserved for the filter.DO NOT USE IN A PRODUCTION
+    /// APPLICATION This is not a realistic application of Bloom Filters as they
+    /// ordinarily are larger and operate on only primary key type fields.
+    /// </summary>
+    public class TestBloomFilteredLucene41Postings : PostingsFormat
+    {
+        private BloomFilteringPostingsFormat @delegate;
+
+        // Special class used to avoid OOM exceptions where Junit tests create many
+        // fields.
+        internal class LowMemoryBloomFactory : BloomFilterFactory
+        {
+            public override FuzzySet GetSetForField(SegmentWriteState state, FieldInfo info)
+            {
+                return FuzzySet.CreateSetBasedOnMaxMemory(1024);
+            }
+
+            public override bool IsSaturated(FuzzySet bloomFilter, FieldInfo fieldInfo)
+            {
+                // For test purposes always maintain the BloomFilter - even past the point
+                // of usefulness when all bits are set
+                return false;
+            }
+        }
+
+        public TestBloomFilteredLucene41Postings()
+                : base("TestBloomFilteredLucene41Postings")
+        {
+            @delegate = new BloomFilteringPostingsFormat(new Lucene41PostingsFormat(),
+                new LowMemoryBloomFactory());
+        }
+
+        public override FieldsConsumer FieldsConsumer(SegmentWriteState state)
+        {
+            return @delegate.FieldsConsumer(state);
+        }
+
+        public override FieldsProducer FieldsProducer(SegmentReadState state)
+        {
+            return @delegate.FieldsProducer(state);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c5d44a5b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
index cf0ba78..66be25c 100644
--- a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
+++ b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
@@ -141,6 +141,7 @@
     <Compile Include="Codecs\asserting\AssertingTermVectorsFormat.cs">
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="Codecs\Bloom\TestBloomFilteredLucene41Postings.cs" />
     <Compile Include="Codecs\compressing\CompressingCodec.cs">
       <SubType>Code</SubType>
     </Compile>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c5d44a5b/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
index 2548f2b..d4e1286 100644
--- a/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.bloom
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
 
-	/*
+namespace Lucene.Net.Codecs.Bloom
+{
+    /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
 	 * this work for additional information regarding copyright ownership.
@@ -18,23 +21,19 @@
 	 * limitations under the License.
 	 */
 
-	using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
-	using TestUtil = org.apache.lucene.util.TestUtil;
-
-	/// <summary>
-	/// Basic tests for BloomPostingsFormat
-	/// </summary>
-	public class TestBloomPostingsFormat : BasePostingsFormatTestCase
-	{
-	  private readonly Codec codec = TestUtil.alwaysPostingsFormat(new TestBloomFilteredLucene41Postings());
-
-	  protected internal override Codec Codec
-	  {
-		  get
-		  {
-			return codec;
-		  }
-	  }
-	}
+    /// <summary>
+    /// Basic tests for BloomPostingsFormat
+    /// </summary>
+    public class TestBloomPostingsFormat : BasePostingsFormatTestCase
+    {
+        private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new TestBloomFilteredLucene41Postings());
 
+        protected override Codec Codec
+        {
+            get
+            {
+                return codec;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c5d44a5b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
index 90e9d38..b2f11cd 100644
--- a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
+++ b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
@@ -43,6 +43,7 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="BlockTerms\TestFixedGapPostingsFormat.cs" />
+    <Compile Include="Bloom\TestBloomPostingsFormat.cs" />
     <Compile Include="DiskDv\TestDiskDocValuesFormat.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="SimpleText\TestSimpleTextDocValuesFormat.cs" />


[03/47] lucenenet git commit: Fixed bug in Core.Store.NativeFSLockFactory - Dispose() override missing.

Posted by ni...@apache.org.
Fixed bug in Core.Store.NativeFSLockFactory - Dispose() override missing.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/e9f1d92d
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/e9f1d92d
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/e9f1d92d

Branch: refs/heads/master
Commit: e9f1d92d745c72ca598a2610bb9d6bb84cb02d78
Parents: e596a4d
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Thu Oct 6 23:10:52 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Oct 6 23:10:52 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Store/NativeFSLockFactory.cs | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e9f1d92d/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs b/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs
index 0baf36c..532308d 100644
--- a/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs
+++ b/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs
@@ -195,6 +195,16 @@ namespace Lucene.Net.Store
             }
         }
 
+        public override void Dispose()
+        {
+            // LUCENENET: No lock to release, just dispose the channel
+            if (Channel != null)
+            {
+                Channel.Dispose();
+                Channel = null;
+            }
+        }
+
         public override void Release()
         {
             lock (this)


[36/47] lucenenet git commit: Removed Ignore attribute on Core.Util.TestVirtualMethod classes that caused all of the tests to be ignored.

Posted by ni...@apache.org.
Removed Ignore attribute on Core.Util.TestVirtualMethod classes that caused all of the tests to be ignored.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/2de54946
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/2de54946
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/2de54946

Branch: refs/heads/master
Commit: 2de54946a008167b7a44d7b7eb0f9833e5992421
Parents: 43fa4e5
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 02:20:20 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Oct 12 01:10:55 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Util/TestVirtualMethod.cs | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2de54946/src/Lucene.Net.Tests/core/Util/TestVirtualMethod.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestVirtualMethod.cs b/src/Lucene.Net.Tests/core/Util/TestVirtualMethod.cs
index 27b13f7..14488af 100644
--- a/src/Lucene.Net.Tests/core/Util/TestVirtualMethod.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestVirtualMethod.cs
@@ -40,7 +40,6 @@ namespace Lucene.Net.Util
         {
         }
 
-        [Ignore]
         internal class TestClass1 : TestVirtualMethod
         {
             public override void PublicTest(string test)
@@ -52,7 +51,6 @@ namespace Lucene.Net.Util
             }
         }
 
-        [Ignore]
         internal class TestClass2 : TestClass1
         {
             protected override void ProtectedTest(int test) // make it public here
@@ -60,7 +58,6 @@ namespace Lucene.Net.Util
             }
         }
 
-        [Ignore]
         internal class TestClass3 : TestClass2
         {
             public override void PublicTest(string test)
@@ -68,12 +65,10 @@ namespace Lucene.Net.Util
             }
         }
 
-        [Ignore]
         internal class TestClass4 : TestVirtualMethod
         {
         }
 
-        [Ignore]
         internal class TestClass5 : TestClass4
         {
         }