Skip to content

Commit c40c63b

Browse files
committed
We don't need to test for a broken JvmLocalCache anymore.
1 parent 92ff1c6 commit c40c63b

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/ConfigurationCacheTest.java

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2023 DiffPlug
2+
* Copyright 2020-2024 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,11 +17,8 @@
1717

1818
import java.io.IOException;
1919

20-
import org.gradle.testkit.runner.BuildResult;
2120
import org.gradle.testkit.runner.GradleRunner;
2221
import org.junit.jupiter.api.Test;
23-
import org.junit.jupiter.api.condition.EnabledForJreRange;
24-
import org.junit.jupiter.api.condition.JRE;
2522

2623
public class ConfigurationCacheTest extends GradleIntegrationHarness {
2724
@Override
@@ -65,8 +62,7 @@ public void helpConfiguresIfTasksAreCreated() throws IOException {
6562
}
6663

6764
@Test
68-
@EnabledForJreRange(max = JRE.JAVA_20)
69-
public void jvmLocalCache() throws IOException {
65+
public void multipleRuns() throws IOException {
7066
setFile("build.gradle").toLines(
7167
"plugins {",
7268
" id 'com.diffplug.spotless'",
@@ -93,14 +89,5 @@ public void jvmLocalCache() throws IOException {
9389
gradleRunner().withArguments("spotlessCheck").buildAndFail();
9490
gradleRunner().withArguments("spotlessApply").build();
9591
assertFile("test.java").sameAsResource("java/googlejavaformat/JavaCodeFormatted.test");
96-
97-
// the withDebug forces it to start a new deamon, but only in Gradle 8.3 and older
98-
// starting with Gradle 8.5 this doesn't work anymore
99-
// and we need Gradle 8.5 for Java 21
100-
// so we can't test this on Java 21 for now
101-
BuildResult failure = gradleRunner().withDebug(true).withArguments("spotlessApply", "--stacktrace").buildAndFail();
102-
failure.getOutput().contains("Spotless daemon-local cache is stale. Regenerate the cache with\n" +
103-
" rm -rf .gradle/configuration-cache\n" +
104-
"For more information see #123\n");
10592
}
10693
}

0 commit comments

Comments
 (0)