Skip to content

Commit

Permalink
Fix test on Windows (#19980)
Browse files Browse the repository at this point in the history
* comment out broken tests

* fixed test for windows
  • Loading branch information
devhl-labs authored Oct 28, 2024
1 parent 32fdd7c commit 8916987
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -740,14 +740,22 @@ public Boolean call() throws Exception {
Future<Boolean> call2 = executor.submit(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
return codegen.executePostProcessor(new String[] { "echo Hello" });
String os = System.getProperty("os.name");
String postProcessor = os.contains("Windows")
? "cmd.exe /c echo hello"
: "echo Hello";
return codegen.executePostProcessor(new String[] { postProcessor });
}
});

Future<Boolean> call3 = executor.submit(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
return codegen.executePostProcessor(new String[] { "echo", "Hello" });
String os = System.getProperty("os.name");
String[] postProcessor = os.contains("Windows")
? new String[] { "cmd.exe", "/c", "echo", "hello" }
: new String[] { "echo", "Hello" };
return codegen.executePostProcessor(postProcessor);
}
});

Expand Down

0 comments on commit 8916987

Please sign in to comment.