From 74631a22563514ec60d01d35f9afe18ecc86c3dd Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Wed, 6 May 2020 13:33:31 +0200 Subject: [PATCH] Fix SearchableSnapshotDirectoryTests.testIndexSearcher() --- .../index/store/BaseSearchableSnapshotIndexInput.java | 3 ++- .../index/store/SearchableSnapshotDirectoryTests.java | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/index/store/BaseSearchableSnapshotIndexInput.java b/x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/index/store/BaseSearchableSnapshotIndexInput.java index 01d9e92eafeda..dccc29e35963a 100644 --- a/x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/index/store/BaseSearchableSnapshotIndexInput.java +++ b/x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/index/store/BaseSearchableSnapshotIndexInput.java @@ -145,7 +145,8 @@ protected final boolean assertCurrentThreadMayAccessBlobStore() { // 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; } diff --git a/x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/index/store/SearchableSnapshotDirectoryTests.java b/x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/index/store/SearchableSnapshotDirectoryTests.java index 10e77e77ac573..7f71f028450df 100644 --- a/x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/index/store/SearchableSnapshotDirectoryTests.java +++ b/x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/index/store/SearchableSnapshotDirectoryTests.java @@ -137,7 +137,6 @@ public void testFileLength() throws Exception { ); } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/56233") public void testIndexSearcher() throws Exception { testDirectories((directory, snapshotDirectory) -> { try (DirectoryReader reader = DirectoryReader.open(directory)) {