From 59087d148ac186930c4a51917e361c599e7314c1 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Mon, 4 Jun 2018 17:28:32 +0200 Subject: [PATCH] [TEST] Ensure MDW.assertNoUnreferencedFilesOnClose is threadsafe --- .../src/java/org/apache/lucene/store/MockDirectoryWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java b/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java index 60f671c25fc..019417771ed 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java +++ b/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java @@ -804,7 +804,7 @@ public class MockDirectoryWrapper extends BaseDirectoryWrapper { } // NOTE: This is off by default; see LUCENE-5574 - private boolean assertNoUnreferencedFilesOnClose; + private volatile boolean assertNoUnreferencedFilesOnClose; public void setAssertNoUnrefencedFilesOnClose(boolean v) { assertNoUnreferencedFilesOnClose = v;