Github user conniey commented on a diff in the pull request:
https://github.com/apache/lucenenet/pull/172#discussion_r71186208
--- Diff: src/Lucene.Net.Tests/core/Index/TestBinaryDocValuesUpdates.cs ---
@@ -1109,25 +1109,55 @@ public virtual void
TestUpdateBinaryDVFieldWithSameNameAsPostingField()
[Test]
public virtual void TestUpdateOldSegments()
{
- Codec[] oldCodecs = new Codec[] { new Lucene40RWCodec(), new
Lucene41RWCodec(), new Lucene42RWCodec(), new Lucene45RWCodec() };
+ OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true;
+ Codec[] oldCodecs = new Codec[] {
+ new Lucene40RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE),
+ new Lucene41RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE),
+ new Lucene42RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE),
+ new Lucene45RWCodec(OLD_FORMAT_IMPERSONATION_IS_ACTIVE)
+ };
Directory dir = NewDirectory();
- bool oldValue = OLD_FORMAT_IMPERSONATION_IS_ACTIVE;
// create a segment with an old Codec
IndexWriterConfig conf =
NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random()));
conf.SetCodec(oldCodecs[Random().Next(oldCodecs.Length)]);
- OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true;
IndexWriter writer = new IndexWriter(dir, conf);
Document doc = new Document();
doc.Add(new StringField("id", "doc", Store.NO));
doc.Add(new BinaryDocValuesField("f", ToBytes(5L)));
writer.AddDocument(doc);
writer.Dispose();
+ dir.Dispose();
+
+ OLD_FORMAT_IMPERSONATION_IS_ACTIVE = false;
--- End diff --
I had forgotten to remove it when I was originally testing this test
failure. I removed it now.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---