Skip to content

Commit e22f760

Browse files
committed
Simplify testServiceStartupFailure env creation
1 parent 0427975 commit e22f760

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/test/java/org/apposed/appose/ServiceTest.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,13 @@ public void testScopeGroovy() throws Exception {
8787
}
8888

8989
@Test
90-
public void testServiceStartupFailure() throws IOException, InterruptedException, TaskException {
90+
public void testServiceStartupFailure() throws Exception {
9191
// Create an environment with no binPaths to test startup failure.
9292
File tempDir = new File("no-pythons-to-be-found-here");
9393
tempDir.mkdirs();
9494
tempDir.deleteOnExit();
9595

96-
Environment env = new Environment() {
97-
@Override public String base() { return tempDir.getAbsolutePath(); }
98-
@Override public List<String> binPaths() { return new ArrayList<>(); }
99-
@Override public List<String> launchArgs() { return new ArrayList<>(); }
100-
@Override public Builder<?> builder() { return null; }
101-
};
96+
Environment env = Appose.custom().base(tempDir).build();
10297
try (Service service = env.python()) {
10398
String info = "";
10499
try {

0 commit comments

Comments
 (0)