geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject geode git commit: GEODE-2212: proper clean up after the tests
Date Fri, 16 Dec 2016 17:39:46 GMT
Repository: geode
Updated Branches:
  refs/heads/develop 4eb672493 -> e3ec736ca


GEODE-2212: proper clean up after the tests


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

Branch: refs/heads/develop
Commit: e3ec736ca0ca56951845972aaa2df1d42ddec42b
Parents: 4eb6724
Author: Jinmei Liao <jiliao@pivotal.io>
Authored: Fri Dec 16 09:30:28 2016 -0800
Committer: Jinmei Liao <jiliao@pivotal.io>
Committed: Fri Dec 16 09:30:28 2016 -0800

----------------------------------------------------------------------
 .../support/LoginHandlerInterceptorJUnitTest.java       |  2 ++
 .../LoginHandlerInterceptorRequestHeaderJUnitTest.java  | 12 ++++++++++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/e3ec736c/geode-web/src/test/java/org/apache/geode/management/internal/web/controllers/support/LoginHandlerInterceptorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-web/src/test/java/org/apache/geode/management/internal/web/controllers/support/LoginHandlerInterceptorJUnitTest.java
b/geode-web/src/test/java/org/apache/geode/management/internal/web/controllers/support/LoginHandlerInterceptorJUnitTest.java
index ae520a2..63d410f 100644
--- a/geode-web/src/test/java/org/apache/geode/management/internal/web/controllers/support/LoginHandlerInterceptorJUnitTest.java
+++ b/geode-web/src/test/java/org/apache/geode/management/internal/web/controllers/support/LoginHandlerInterceptorJUnitTest.java
@@ -54,12 +54,14 @@ public class LoginHandlerInterceptorJUnitTest {
     mockContext = new Mockery();
     mockContext.setImposteriser(ClassImposteriser.INSTANCE);
     mockContext.setThreadingPolicy(new Synchroniser());
+    LoginHandlerInterceptor.getEnvironment().clear();
   }
 
   @After
   public void tearDown() {
     mockContext.assertIsSatisfied();
     mockContext = null;
+    LoginHandlerInterceptor.getEnvironment().clear();
   }
 
   private String createEnvironmentVariable(final String name) {

http://git-wip-us.apache.org/repos/asf/geode/blob/e3ec736c/geode-web/src/test/java/org/apache/geode/management/internal/web/controllers/support/LoginHandlerInterceptorRequestHeaderJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-web/src/test/java/org/apache/geode/management/internal/web/controllers/support/LoginHandlerInterceptorRequestHeaderJUnitTest.java
b/geode-web/src/test/java/org/apache/geode/management/internal/web/controllers/support/LoginHandlerInterceptorRequestHeaderJUnitTest.java
index a7190f9..118e385 100644
--- a/geode-web/src/test/java/org/apache/geode/management/internal/web/controllers/support/LoginHandlerInterceptorRequestHeaderJUnitTest.java
+++ b/geode-web/src/test/java/org/apache/geode/management/internal/web/controllers/support/LoginHandlerInterceptorRequestHeaderJUnitTest.java
@@ -19,6 +19,8 @@ import static org.assertj.core.api.Assertions.assertThat;
 
 import org.apache.geode.test.junit.categories.UnitTest;
 
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.springframework.mock.web.MockHttpServletRequest;
@@ -28,6 +30,16 @@ import java.util.Map;
 @Category(UnitTest.class)
 public class LoginHandlerInterceptorRequestHeaderJUnitTest {
 
+  @Before
+  public void before() {
+    LoginHandlerInterceptor.getEnvironment().clear();
+  }
+
+  @After
+  public void after() {
+    LoginHandlerInterceptor.getEnvironment().clear();
+  }
+
   @Test
   public void testCaseInsensitive() throws Exception {
     LoginHandlerInterceptor interceptor = new LoginHandlerInterceptor();


Mime
View raw message