geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jensde...@apache.org
Subject [geode] branch feature/GEODE-5212 updated: maybe powershell
Date Tue, 31 Jul 2018 04:12:35 GMT
This is an automated email from the ASF dual-hosted git repository.

jensdeppe pushed a commit to branch feature/GEODE-5212
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/feature/GEODE-5212 by this push:
     new 895300c  maybe powershell
895300c is described below

commit 895300cb1f6eb876725ade6ba50e2c07dc3f20cb
Author: Jens Deppe <jdeppe@pivotal.io>
AuthorDate: Mon Jul 30 21:12:24 2018 -0700

    maybe powershell
---
 .../internal/cache/backup/BackupIntegrationTest.java | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/backup/BackupIntegrationTest.java
b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/backup/BackupIntegrationTest.java
index ad95c1c..be5a210 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/backup/BackupIntegrationTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/backup/BackupIntegrationTest.java
@@ -32,7 +32,6 @@ import java.io.InputStreamReader;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.nio.file.Files;
-import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -177,8 +176,9 @@ public class BackupIntegrationTest {
     // destroy the disk directories
     destroyDiskDirs();
 
-    Files.write(Paths.get("c:\\debug.txt"), writer.getBackupDirectory().toString().getBytes());
-    Thread.sleep(60 * 60 * 1000);
+    // Files.write(Paths.get("c:\\debug.txt"),
+    // (writer.getBackupDirectory().toString() + "\\restore.bat").getBytes());
+    // Thread.sleep(60 * 60 * 1000);
 
     // Now the restore script should work
     restoreBackup(backupDir, false);
@@ -467,10 +467,16 @@ public class BackupIntegrationTest {
 
     boolean isWindows = script.getName().endsWith("bat");
     if (isWindows) {
-      command.add("cmd.exe");
-      command.add("/c");
-      command.add(String.format("cd /d %s && %s",
-          script.getCanonicalFile().toPath().getParent().toString(), script.getCanonicalPath()));
+      // command.add("cmd.exe");
+      // command.add("/c");
+      // command.add(String.format("cd /d %s && %s",
+      // script.getCanonicalFile().toPath().getParent().toString(), script.getCanonicalPath()));
+
+      command.add("powershell.exe");
+      command.add("-command");
+      command.add(String.format(
+          "$A = Start-Process -FilePath %s -Wait -PassThru -WindowStyle Hidden; $A.ExitCode",
+          script.getCanonicalPath()));
     } else {
       command.add(script.getCanonicalPath());
     }


Mime
View raw message