Compiling the auto configure tests takes a long time on my machine. It took 5 minutes to move from ConditionalOnResourceTests
to FlywayPropertiesTests
:
1552370305 Mar 11 22:58:25 2019 ./org/springframework/boot/autoconfigure/flyway/FlywayPropertiesTests.class
1552369993 Mar 11 22:53:13 2019 ./org/springframework/boot/autoconfigure/condition/ConditionalOnResourceTests.class
JStack at the time shows:
java.lang.Thread.State: RUNNABLE
at java.lang.String.substring(String.java:1969)
at java.lang.String.subSequence(String.java:2003)
at java.util.regex.Matcher.getSubSequence(Matcher.java:1294)
at java.util.regex.Matcher.group(Matcher.java:541)
at java.util.Formatter$FormatSpecifier.<init>(Formatter.java:2720)
at java.util.Formatter.parse(Formatter.java:2560)
at java.util.Formatter.format(Formatter.java:2501)
at java.util.Formatter.format(Formatter.java:2455)
at java.lang.String.format(String.java:2940)
at com.sun.tools.javac.comp.DeferredAttr$DeferredTypeMap.<init>(DeferredAttr.java:828)
at com.sun.tools.javac.comp.Attr.checkMethod(Attr.java:3838)
at com.sun.tools.javac.comp.Attr.checkIdInternal(Attr.java:3616)
at com.sun.tools.javac.comp.Attr.checkMethodIdInternal(Attr.java:3527)
at com.sun.tools.javac.comp.Attr.checkMethodId(Attr.java:3502)
at com.sun.tools.javac.comp.Attr.checkId(Attr.java:3489)
at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3371)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1897)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576)
at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1825)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T11:33:14-07:00)
Maven home: /Users/pwebb/tools/apache-maven-current
Java version: 1.8.0_202, vendor: AdoptOpenJdk, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.3", arch: "x86_64", family: "mac"
Comment From: wilkinsona
I've tried to reproduce this just building spring-boot-autoconfigure
and have been unable to do so. I've tried with both 1.8.0_202 and 1.8.0_181. Does it only happen when running a full build?
Comment From: philwebb
Yeah, it's super odd. It doesn't even happen each time with a full build. Running mvn clean install
from the checkout root causes it. If I kill java
and run again with -fr :spring-boot-autoconfigure
it's fine.
Comment From: wilkinsona
I wonder if it’s a memory leak (in Maven?) and it’s GC overhead that slows it to a crawl.
Comment From: snicoll
@philwebb do you have any MAVEN_OPTS
?
Comment From: andresetevejob
I want to investigate,how can do to simulate the issue
Comment From: wilkinsona
@andresetevejob As you can see from the comments above, we're not entirely sure how to reliably reproduce the problem.
Comment From: wilkinsona
I don't think we've seen this problem since the move to Gradle.