geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject incubator-geode git commit: GEODE-89: Convert to using JUnit rules
Date Thu, 09 Jul 2015 21:50:38 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-89 [created] f04a3b75d


GEODE-89: Convert to using JUnit rules


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f04a3b75
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f04a3b75
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f04a3b75

Branch: refs/heads/feature/GEODE-89
Commit: f04a3b75d5b8ee3f4efa70c4bbd8fad8959d997b
Parents: 7cf940f
Author: Kirk Lund <klund@pivotal.io>
Authored: Thu Jul 9 14:49:46 2015 -0700
Committer: Kirk Lund <klund@pivotal.io>
Committed: Thu Jul 9 14:49:46 2015 -0700

----------------------------------------------------------------------
 .../gemfire/internal/logging/log4j/FastLoggerJUnitTest.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f04a3b75/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/FastLoggerJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/FastLoggerJUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/FastLoggerJUnitTest.java
index 2aab5df..8880336 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/FastLoggerJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/FastLoggerJUnitTest.java
@@ -16,7 +16,9 @@ import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.core.config.ConfigurationFactory;
 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 com.gemstone.gemfire.internal.logging.LogService;
@@ -35,14 +37,11 @@ public class FastLoggerJUnitTest {
   
   private File configFile;
   
-  @Before
-  public void setUp() {
-    System.clearProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY);
-  }
+  @Rule
+  public RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
   
   @After
   public void tearDown() {
-    System.clearProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY);
     LogService.reconfigure();
     if (this.configFile != null && this.configFile.exists()) {
       this.configFile.delete();


Mime
View raw message