瀏覽代碼

Fix visibility issue in RetryTests

Daniel Mitterdorfer 9 年之前
父節點
當前提交
3f87b0809e
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      core/src/test/java/org/elasticsearch/action/bulk/RetryTests.java

+ 3 - 3
core/src/test/java/org/elasticsearch/action/bulk/RetryTests.java

@@ -126,9 +126,9 @@ public class RetryTests extends ESTestCase {
 
 
     private static class AssertingListener implements ActionListener<BulkResponse> {
     private static class AssertingListener implements ActionListener<BulkResponse> {
         private final CountDownLatch latch;
         private final CountDownLatch latch;
-        private int countOnResponseCalled = 0;
-        private Throwable lastFailure;
-        private BulkResponse response;
+        private volatile int countOnResponseCalled = 0;
+        private volatile Throwable lastFailure;
+        private volatile BulkResponse response;
 
 
         private AssertingListener() {
         private AssertingListener() {
             latch = new CountDownLatch(1);
             latch = new CountDownLatch(1);