Skip to content

Commit

Permalink
GEODE-2853: Change of locator list request interval
Browse files Browse the repository at this point in the history
Replace the manual cleanup of system properties with the Rule.

This closes apache#483
  • Loading branch information
masaki-yamakawa authored and bschuchardt committed May 15, 2017
1 parent 762666c commit 4b26095
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
import org.apache.geode.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.RestoreSystemProperties;
import org.junit.experimental.categories.Category;

import java.io.IOException;
Expand Down Expand Up @@ -80,6 +82,9 @@ public class AutoConnectionSourceImplJUnitTest {
private ScheduledExecutorService background;
private PoolStats poolStats;

@Rule
public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();

@Before
public void setUp() throws Exception {
Properties props = new Properties();
Expand Down Expand Up @@ -110,7 +115,6 @@ public void setUp() throws Exception {

@After
public void tearDown() {
System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "LOCATOR_UPDATE_INTERVAL");
background.shutdownNow();
try {
cache.close();
Expand Down

0 comments on commit 4b26095

Please sign in to comment.