Skip to content

Commit

Permalink
GEODE-6820: Initialize count down latches in setup method. (apache#3652)
Browse files Browse the repository at this point in the history
  • Loading branch information
pivotal-eshu authored May 31, 2019
1 parent 30ddcbd commit 7bfbf55
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ public class ClearTXLockingDUnitTest implements Serializable {
private static final String REGION_NAME1 = "testRegion1";
private static final String REGION_NAME2 = "testRegion2";

private static final CountDownLatch opsLatch = new CountDownLatch(1);
private static final CountDownLatch regionLatch = new CountDownLatch(1);
private static final CountDownLatch verifyLatch = new CountDownLatch(1);
private static CountDownLatch opsLatch;
private static CountDownLatch regionLatch;
private static CountDownLatch verifyLatch;

private static volatile InternalCache cache;

Expand All @@ -93,6 +93,15 @@ public void setUp() {

createCache(vm0);
createCache(vm1);

for (VM vm : VM.toArray(vm0, vm1, getController())) {
vm.invoke(() -> {
opsLatch = new CountDownLatch(1);
regionLatch = new CountDownLatch(1);
verifyLatch = new CountDownLatch(1);
});
}

}

@After
Expand Down

0 comments on commit 7bfbf55

Please sign in to comment.