lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r749000 - /lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
Date Sun, 01 Mar 2009 11:28:41 GMT
Author: mikemccand
Date: Sun Mar  1 11:28:41 2009
New Revision: 749000

URL: http://svn.apache.org/viewvc?rev=749000&view=rev
Log:
LUCENE-1314: fix ref-count tests in TestIndexReaderReopen, take 2

Modified:
    lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java

Modified: lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java?rev=749000&r1=748999&r2=749000&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
(original)
+++ lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
Sun Mar  1 11:28:41 2009
@@ -458,7 +458,7 @@
       
       reader3.close();
       assertRefCountEquals(0, reader1);
-      assertReaderOpen(reader1);
+      assertReaderClosed(reader1, true, false);
       
       reader2.close();
       assertRefCountEquals(0, reader1);
@@ -511,17 +511,17 @@
       assertRefCountEquals(1 + mode, reader1);
       
       reader1.close();
-      assertRefCountEquals(3, reader1);
+      assertRefCountEquals(1, reader1);
       
       parallelReader2.close();
-      assertRefCountEquals(1, reader1);
+      assertRefCountEquals(0, reader1);
       
       parallelReader2.close();
       assertRefCountEquals(0, reader1);
       
       reader3.close();
       assertRefCountEquals(0, reader1);
-      assertReaderOpen(reader1);
+      assertReaderClosed(reader1, true, false);
       
       reader2.close();
       assertRefCountEquals(0, reader1);
@@ -565,13 +565,13 @@
     
     // Now reader2-reader5 references reader1. reader1 and reader2
     // share the same norms. reader3, reader4, reader5 also share norms.
-    assertRefCountEquals(5, reader1);
+    assertRefCountEquals(1, reader1);
     assertFalse(reader1.normsClosed());
     reader1.close();
-    assertRefCountEquals(4, reader1);
+    assertRefCountEquals(0, reader1);
     assertFalse(reader1.normsClosed());
     reader2.close();
-    assertRefCountEquals(3, reader1);
+    assertRefCountEquals(0, reader1);
     // now the norms for field1 and field2 should be closed
     assertTrue(reader1.normsClosed("field1"));
     assertTrue(reader1.normsClosed("field2"));
@@ -580,10 +580,10 @@
     assertFalse(reader1.normsClosed("field4"));
     
     reader3.close();
-    assertRefCountEquals(2, reader1);
+    assertRefCountEquals(0, reader1);
     assertFalse(reader3.normsClosed());
     reader5.close();
-    assertRefCountEquals(1, reader1);
+    assertRefCountEquals(0, reader1);
     assertFalse(reader3.normsClosed());
     reader4.close();
     assertRefCountEquals(0, reader1);



Mime
View raw message