Skip to content

Commit 01064d9

Browse files
authored
Merge pull request #499 from diffplug/feat/test-provisioner-flaky
Test provisioner has been too flaky
2 parents b7f8c55 + 5236a82 commit 01064d9

File tree

8 files changed

+21
-37
lines changed

8 files changed

+21
-37
lines changed

CHANGES.md

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ You might be looking for:
77

88
### Version 1.27.0-SNAPSHOT - TBD (javadoc [lib](https://diffplug.github.io/spotless/javadoc/spotless-lib/snapshot/) [lib-extra](https://diffplug.github.io/spotless/javadoc/spotless-lib-extra/snapshot/), [snapshot repo](https://oss.sonatype.org/content/repositories/snapshots/com/diffplug/spotless/))
99

10+
* Ignored `KtLintStepTest`, because [gradle/gradle#11752](https://github.com/gradle/gradle/issues/11752) is causing too many CI failures. ([#499](https://github.com/diffplug/spotless/pull/499))
11+
* Also fixed a minor problem in TestProvisioner.
12+
1013
### Version 1.26.1 - November 27th 2019 (javadoc [lib](https://diffplug.github.io/spotless/javadoc/spotless-lib/1.26.0/) [lib-extra](https://diffplug.github.io/spotless/javadoc/spotless-lib-extra/1.26.0/), artifact [lib]([jcenter](https://bintray.com/diffplug/opensource/spotless-lib), [lib-extra]([jcenter](https://bintray.com/diffplug/opensource/spotless-lib-extra)))
1114

1215
* Revert the change in console display of errors from 1.26.0 ([#485](https://github.com/diffplug/spotless/pull/485)) because [of these problems](https://github.com/diffplug/spotless/pull/485#issuecomment-552925932).

RELEASE_CHECKLIST.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
- [ ] Update [`CHANGES.md`](CHANGES.md), [`plugin-gradle/CHANGES.md`](plugin-gradle/CHANGES.md), and [`plugin-maven/CHANGES.md`](plugin-maven/CHANGES.md)
44
- [ ] Upgrade [`gradle.properties`](gradle.properties).
5+
- [ ] In an IDE, unignore `KtLintStepTest` and run
56
- [ ] Run `./gradlew spotlessApply`
67
- [ ] Make sure all files are committed
78
- [ ] Run `./gradlew check`

gradle/wrapper/gradle-wrapper.jar

-426 Bytes
Binary file not shown.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

+3-19
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
#!/usr/bin/env sh
22

3-
#
4-
# Copyright 2015 the original author or authors.
5-
#
6-
# Licensed under the Apache License, Version 2.0 (the "License");
7-
# you may not use this file except in compliance with the License.
8-
# You may obtain a copy of the License at
9-
#
10-
# https://www.apache.org/licenses/LICENSE-2.0
11-
#
12-
# Unless required by applicable law or agreed to in writing, software
13-
# distributed under the License is distributed on an "AS IS" BASIS,
14-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15-
# See the License for the specific language governing permissions and
16-
# limitations under the License.
17-
#
18-
193
##############################################################################
204
##
215
## Gradle start up script for UN*X
@@ -44,7 +28,7 @@ APP_NAME="Gradle"
4428
APP_BASE_NAME=`basename "$0"`
4529

4630
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
31+
DEFAULT_JVM_OPTS='"-Xmx64m"'
4832

4933
# Use the maximum available, or set MAX_FD != -1 to use that value.
5034
MAX_FD="maximum"
@@ -125,8 +109,8 @@ if $darwin; then
125109
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126110
fi
127111

128-
# For Cygwin or MSYS, switch paths to Windows format before running java
129-
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
112+
# For Cygwin, switch paths to Windows format before running java
113+
if $cygwin ; then
130114
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131115
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132116
JAVACMD=`cygpath --unix "$JAVACMD"`

gradlew.bat

+1-17
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
@rem
2-
@rem Copyright 2015 the original author or authors.
3-
@rem
4-
@rem Licensed under the Apache License, Version 2.0 (the "License");
5-
@rem you may not use this file except in compliance with the License.
6-
@rem You may obtain a copy of the License at
7-
@rem
8-
@rem https://www.apache.org/licenses/LICENSE-2.0
9-
@rem
10-
@rem Unless required by applicable law or agreed to in writing, software
11-
@rem distributed under the License is distributed on an "AS IS" BASIS,
12-
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
@rem See the License for the specific language governing permissions and
14-
@rem limitations under the License.
15-
@rem
16-
171
@if "%DEBUG%" == "" @echo off
182
@rem ##########################################################################
193
@rem
@@ -30,7 +14,7 @@ set APP_BASE_NAME=%~n0
3014
set APP_HOME=%DIRNAME%
3115

3216
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33-
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
17+
set DEFAULT_JVM_OPTS="-Xmx64m"
3418

3519
@rem Find java.exe
3620
if defined JAVA_HOME goto findJavaFromJavaHome

testlib/src/main/java/com/diffplug/spotless/TestProvisioner.java

+5
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ private static Provisioner caching(String name, Supplier<Provisioner> input) {
103103
}
104104
} else {
105105
cached = new HashMap<>();
106+
try {
107+
Files.createParentDirs(cacheFile);
108+
} catch (IOException e) {
109+
throw Errors.asRuntime(e);
110+
}
106111
}
107112
return (withTransitives, mavenCoordsRaw) -> {
108113
ImmutableSet<String> mavenCoords = ImmutableSet.copyOf(mavenCoordsRaw);

testlib/src/test/java/com/diffplug/spotless/kotlin/KtLintStepTest.java

+7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package com.diffplug.spotless.kotlin;
1717

18+
import org.junit.Ignore;
1819
import org.junit.Test;
1920

2021
import com.diffplug.spotless.FormatterStep;
@@ -23,6 +24,12 @@
2324
import com.diffplug.spotless.StepHarness;
2425
import com.diffplug.spotless.TestProvisioner;
2526

27+
/**
28+
* This class is the only one that uses jcenter, and it seems to be the only one that
29+
* causes these problems. The root is still a gradle bug, but in the meantime we don't
30+
* need to hold up *every* PR with this: https://github.com/gradle/gradle/issues/11752
31+
*/
32+
@Ignore
2633
public class KtLintStepTest extends ResourceHarness {
2734
@Test
2835
public void behavior() throws Exception {

0 commit comments

Comments
 (0)