Remove a test in TestDocumentsWriterDeleteQueue (#12223)

This commit is contained in:
Patrick Zhai 2023-04-04 10:49:14 -07:00 committed by GitHub
parent 56aef7265a
commit c31017589b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 21 deletions

View File

@ -16,7 +16,6 @@
*/
package org.apache.lucene.index;
import java.lang.ref.WeakReference;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
@ -34,26 +33,7 @@ import org.apache.lucene.util.ThreadInterruptedException;
/** Unit test for {@link DocumentsWriterDeleteQueue} */
public class TestDocumentsWriterDeleteQueue extends LuceneTestCase {
public void testAdvanceReferencesOriginal() {
WeakAndNext weakAndNext = new WeakAndNext();
DocumentsWriterDeleteQueue next = weakAndNext.next;
assertNotNull(next);
System.gc();
assertNull(weakAndNext.weak.get());
}
class WeakAndNext {
final WeakReference<DocumentsWriterDeleteQueue> weak;
final DocumentsWriterDeleteQueue next;
WeakAndNext() {
DocumentsWriterDeleteQueue deleteQueue = new DocumentsWriterDeleteQueue(null);
weak = new WeakReference<>(deleteQueue);
next = deleteQueue.advanceQueue(2);
}
}
public void testUpdateDelteSlices() throws Exception {
public void testUpdateDeleteSlices() throws Exception {
DocumentsWriterDeleteQueue queue = new DocumentsWriterDeleteQueue(null);
final int size = 200 + random().nextInt(500) * RANDOM_MULTIPLIER;
Integer[] ids = new Integer[size];