1
0
Эх сурвалжийг харах

Fix SearchableSnapshotDirectoryTests.testIndexSearcher() (#56275)

Closes #56233
Tanguy Leroux 5 жил өмнө
parent
commit
a443e1387d

+ 2 - 1
x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/index/store/BaseSearchableSnapshotIndexInput.java

@@ -145,7 +145,8 @@ public abstract class BaseSearchableSnapshotIndexInput extends BufferedIndexInpu
 
             // Unit tests access the blob store on the main test thread; simplest just to permit this rather than have them override this
             // method somehow.
-            || threadName.startsWith("TEST-") : "current thread [" + Thread.currentThread() + "] may not read " + fileInfo;
+            || threadName.startsWith("TEST-")
+            || threadName.startsWith("LuceneTestCase") : "current thread [" + Thread.currentThread() + "] may not read " + fileInfo;
         return true;
     }
 

+ 0 - 1
x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/index/store/SearchableSnapshotDirectoryTests.java

@@ -137,7 +137,6 @@ public class SearchableSnapshotDirectoryTests extends ESTestCase {
         );
     }
 
-    @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/56233")
     public void testIndexSearcher() throws Exception {
         testDirectories((directory, snapshotDirectory) -> {
             try (DirectoryReader reader = DirectoryReader.open(directory)) {