Skip to content

Commit 78b4ef3

Browse files
committed
fix syntax error add only EnabledIf
1 parent 4468397 commit 78b4ef3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-ant/src/test/java/smoketest/ant/SampleAntApplicationIT.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
class SampleAntApplicationIT {
3737

3838
@Test
39-
@EnabledIf("isJavaExecutableAvailable")
40-
@EnabledIf("isJarAvailable")
39+
@EnabledIf("isTestEnabled")
4140
void runJar() throws Exception {
4241
File buildDir = new File("build");
4342
System.out.println("Build directory exists: " + buildDir.exists());
@@ -113,4 +112,8 @@ boolean isJarAvailable() {
113112
return jarFiles != null && jarFiles.length > 0;
114113
}
115114

115+
boolean isTestEnabled() {
116+
return isJavaExecutableAvailable() && isJarAvailable();
117+
}
118+
116119
}

0 commit comments

Comments
 (0)