geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [2/4] incubator-geode git commit: Use TemporaryFolder and TestName
Date Tue, 26 Apr 2016 23:44:09 GMT
Use TemporaryFolder and TestName


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

Branch: refs/heads/feature/GEODE-1276
Commit: 555bc8b0923d98701ae14422d9feb975774619a6
Parents: d92ffc4
Author: Kirk Lund <klund@apache.org>
Authored: Tue Apr 26 16:25:21 2016 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Tue Apr 26 16:25:21 2016 -0700

----------------------------------------------------------------------
 .../LauncherLifecycleCommandsIntegrationTest.java       | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/555bc8b0/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsIntegrationTest.java
b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsIntegrationTest.java
index c7479bb..42e7291 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsIntegrationTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsIntegrationTest.java
@@ -32,8 +32,11 @@ import java.util.jar.Manifest;
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TemporaryFolder;
+import org.junit.rules.TestName;
 
 import com.gemstone.gemfire.internal.util.IOUtils;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
@@ -52,6 +55,12 @@ public class LauncherLifecycleCommandsIntegrationTest {
 
   private LauncherLifecycleCommands launcherCommands;
 
+  @Rule
+  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+  @Rule
+  public TestName testName = new TestName();
+
   @Before
   public void setup() {
     launcherCommands = new LauncherLifecycleCommands();
@@ -83,7 +92,8 @@ public class LauncherLifecycleCommandsIntegrationTest {
   public void testReadPid() throws IOException {
     final int expectedPid = 12345;
 
-    File pidFile = new File(getClass().getSimpleName().concat("_testReadPid.pid"));
+    File folder = temporaryFolder.newFolder();
+    File pidFile = new File(folder, getClass().getSimpleName() + "_" + testName.getMethodName()
+ ".pid");
 
     assertTrue(pidFile.createNewFile());
 


Mime
View raw message