Skip to content

Commit 0fc7b37

Browse files
committed
FSBlobContainerTests: workaround for occasional testCopy failure on CI
1 parent 0ca124c commit 0fc7b37

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/src/test/java/org/elasticsearch/common/blobstore/fs/FsBlobContainerTests.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,12 @@ private static void checkAtomicWrite() throws IOException {
377377
}
378378
}
379379

380-
public void testCopy() throws IOException {
380+
public void testCopy() throws Exception {
381+
// without this, on CI the test sometimes fails with
382+
// java.nio.file.ProviderMismatchException: mismatch, expected: class org.elasticsearch.common.blobstore.fs.FsBlobContainerTests$1,
383+
// got: class org.elasticsearch.common.blobstore.fs.FsBlobContainerTests$MockFileSystemProvider
384+
// and I haven't figured out why yet.
385+
restoreFileSystem();
381386
final var path = PathUtils.get(createTempDir().toString());
382387
final var store = new FsBlobStore(randomIntBetween(1, 8) * 1024, path, false);
383388
final var sourcePath = BlobPath.EMPTY.add("source");

0 commit comments

Comments
 (0)