lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [18/33] lucenenet git commit: Lucene.Net.Tests.Index.TestIndexWriterReader.TestDuringAddIndexes(): reformatted and factored out SynchronizedList<T> (test is still failing).
Date Fri, 17 Mar 2017 22:28:48 GMT
Lucene.Net.Tests.Index.TestIndexWriterReader.TestDuringAddIndexes(): reformatted and factored
out SynchronizedList<T> (test is still failing).


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

Branch: refs/heads/api-work
Commit: 9e779f7b95b4c25140ac8004ee9a267b1cd8b355
Parents: bfa2bf6
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Mar 17 17:28:11 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Fri Mar 17 17:28:11 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/Index/TestIndexWriterReader.cs | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9e779f7b/src/Lucene.Net.Tests/Index/TestIndexWriterReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterReader.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterReader.cs
index 2f0bf53..e94fd27 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriterReader.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriterReader.cs
@@ -862,7 +862,10 @@ namespace Lucene.Net.Index
         public virtual void TestDuringAddIndexes()
         {
             Directory dir1 = GetAssertNoDeletesDirectory(NewDirectory());
-            IndexWriter writer = new IndexWriter(dir1, NewIndexWriterConfig(TEST_VERSION_CURRENT,
new MockAnalyzer(Random())).SetMergePolicy(NewLogMergePolicy(2)));
+            IndexWriter writer = new IndexWriter(
+                dir1, 
+                NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random()))
+                    .SetMergePolicy(NewLogMergePolicy(2)));
 
             // create the index
             CreateIndexNoClose(false, "test", writer);
@@ -879,7 +882,7 @@ namespace Lucene.Net.Index
             const float SECONDS = 0.5f;
 
             long endTime = (long)(Environment.TickCount + 1000.0 * SECONDS);
-            IList<Exception> excs = new SynchronizedList<Exception>();
+            ConcurrentHashSet<Exception> excs = new ConcurrentHashSet<Exception>();
 
             // Only one thread can addIndexes at a time, because
             // IndexWriter acquires a write lock in each directory:
@@ -941,9 +944,9 @@ namespace Lucene.Net.Index
             private IndexWriter Writer;
             private Directory[] Dirs;
             private long EndTime;
-            private IList<Exception> Excs;
+            private ISet<Exception> Excs;
 
-            public ThreadAnonymousInnerClassHelper(IndexWriter writer, Directory[] dirs,
long endTime, IList<Exception> excs)
+            public ThreadAnonymousInnerClassHelper(IndexWriter writer, Directory[] dirs,
long endTime, ISet<Exception> excs)
             {
                 this.Writer = writer;
                 this.Dirs = dirs;


Mime
View raw message