Skip to content

Commit 0193577

Browse files
committed
Revert RelocationTest
1 parent 01771a2 commit 0193577

File tree

1 file changed

+3
-5
lines changed
  • src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow

1 file changed

+3
-5
lines changed

src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/RelocationTest.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ import org.junit.jupiter.params.provider.ValueSource
3232
import org.opentest4j.AssertionFailedError
3333

3434
class RelocationTest : BasePluginTest() {
35-
private val javaExec = System.getProperty("java.home") + "/bin/java"
36-
3735
@ParameterizedTest
3836
@ValueSource(strings = ["foo", "new.pkg", "new/path"])
3937
fun autoRelocation(relocationPrefix: String) {
@@ -498,7 +496,7 @@ class RelocationTest : BasePluginTest() {
498496
)
499497

500498
runWithSuccess(shadowJarPath)
501-
val result = runProcess(javaExec, "-jar", outputShadowedJar.use { it.toString() })
499+
val result = runProcess("java", "-jar", outputShadowedJar.use { it.toString() })
502500

503501
assertThat(result).contains("shadow.foo.Foo", "shadow.foo.Bar")
504502
}
@@ -526,7 +524,7 @@ class RelocationTest : BasePluginTest() {
526524
)
527525

528526
runWithSuccess(shadowJarPath)
529-
val result = runProcess(javaExec, "-jar", outputShadowedJar.use { it.toString() })
527+
val result = runProcess("java", "-jar", outputShadowedJar.use { it.toString() })
530528

531529
if (skipStringConstants) {
532530
assertThat(result).contains("foo.Foo", "foo.Bar")
@@ -564,7 +562,7 @@ class RelocationTest : BasePluginTest() {
564562
)
565563

566564
runWithSuccess(shadowJarPath)
567-
val result = runProcess(javaExec, "-jar", outputShadowedJar.use { it.toString() })
565+
val result = runProcess("java", "-jar", outputShadowedJar.use { it.toString() })
568566

569567
// Just check that the jar can be executed without NoClassDefFoundError.
570568
assertThat(result)

0 commit comments

Comments
 (0)