You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/12/03 20:33:49 UTC

[GitHub] [geode] jchen21 commented on a change in pull request #5799: GEODE-8634: Fix AsyncInvocationTimeoutDistributedTest flakiness

jchen21 commented on a change in pull request #5799:
URL: https://github.com/apache/geode/pull/5799#discussion_r535576021



##########
File path: geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/tests/AsyncInvocationTimeoutDistributedTest.java
##########
@@ -40,12 +41,20 @@
 
   private static final long TIMEOUT_MILLIS = getTimeout().toMillis();
 
-  private static final AtomicReference<Long> threadId = new AtomicReference<>();
+  private static final AtomicReference<Long> threadId = new AtomicReference<>(0L);
   private static final AtomicReference<CountDownLatch> latch = new AtomicReference<>();
 
   @Rule
   public DistributedRule distributedRule = new DistributedRule();
 
+  @Before
+  public void setUp() {
+    getVM(0).invoke(() -> {
+      latch.set(null);

Review comment:
       Is it better to initialize `latch` to `CountDownLatch(0)` instead of `null`? Also initialize it in line 45, when `latch` is declared?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org