From d57267a0e6061eaee549b9b56f9d1c77ece83a1a Mon Sep 17 00:00:00 2001 From: Shubham Chaudhary <36742242+shubhamvishu@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:10:40 +0530 Subject: [PATCH] Fix TestLucene90FieldInfosFormat.testRandom (#13135) --- .../apache/lucene/tests/index/BaseFieldInfoFormatTestCase.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseFieldInfoFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseFieldInfoFormatTestCase.java index 5f09348fdfe..a8af8b03a6b 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseFieldInfoFormatTestCase.java +++ b/lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseFieldInfoFormatTestCase.java @@ -278,6 +278,9 @@ public abstract class BaseFieldInfoFormatTestCase extends BaseIndexFileFormatTes String parentField = random().nextBoolean() ? TestUtil.randomUnicodeString(random()) : null; + if (softDeletesField != null && softDeletesField.equals(parentField)) { + parentField = null; + } var builder = INDEX_PACKAGE_ACCESS.newFieldInfosBuilder(softDeletesField, parentField); for (String field : fieldNames) {