Preface: I have tried for several days to solve this problem on my own before bothering any of you nice people. Apologies in advance.
My problem: Tests hang for my custom source module as well as the spring-xd-samples project rss-feed-source.
I am running spring-xd 1.1.1.RELEASE on Java 1.7 OSX 10.9.5 and see the same result with mvn in the terminal as well as in Spring Tool Suite. It may be worth mentioning that I have no issue running spring's xd-amdin, xd-container, xd-singlenode, or xd-shell executables.
FeedSourceModuleIntegrationTest is where the several second hang occurs.
/**
* Start the single node container, binding random unused ports, etc. to not conflict with any other instances
* running on this host. Configure the ModuleRegistry to include the project module.
*/
#BeforeClass
public static void setUp() {
RandomConfigurationSupport randomConfigSupport = new RandomConfigurationSupport();
application = new SingleNodeApplication().run(); // Hang occurs here!
SingleNodeIntegrationTestSupport singleNodeIntegrationTestSupport = new SingleNodeIntegrationTestSupport(application);
singleNodeIntegrationTestSupport.addModuleRegistry(new SingletonModuleRegistry(ModuleType.source, "feed"));
}
FeedConfigurationTest Works just fine!
Here is the terminal output:
(may need to scroll)
$ cd rss-feed-source
$ mvn test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building rss-feed-source 1.0.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # rss-feed-source ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # rss-feed-source ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/food_meister/Documents/spring-xd-samples/rss-feed-source/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # rss-feed-source ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # rss-feed-source ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /Users/food_mesiter/Documents/spring-xd-samples/rss-feed-source/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.18:test (default-test) # rss-feed-source ---
[INFO] Surefire report directory: /Users/food_meister/Documents/spring-xd-samples/rss-feed-source/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.acme.FeedConfigurationTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.749 sec - in com.acme.FeedConfigurationTest
Running com.acme.FeedSourceModuleIntegrationTest
_____ __ _______
/ ___| (-) \ \ / / _ \
\ `--. _ __ _ __ _ _ __ __ _ \ V /| | | |
`--. \ '_ \| '__| | '_ \ / _` | / ^ \| | | |
/\__/ / |_) | | | | | | | (_| | / / \ \ |/ /
\____/| .__/|_| |_|_| |_|\__, | \/ \/___/
| | __/ |
|_| |___/
1.1.1.RELEASE eXtreme Data
Started : SingleNodeApplication
Documentation: https://github.com/spring-projects/spring-xd/wiki
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.026 sec - in com.acme.FeedSourceModuleIntegrationTest
[2015-04-11 23:14:01,577] WARN Failed to unregister MBean InMemoryDataTree (org.apache.zookeeper.jmx.MBeanRegistry:117)
[2015-04-11 23:14:01,578] WARN Error during unregister (org.apache.zookeeper.jmx.MBeanRegistry:134)
javax.management.InstanceNotFoundException: org.apache.ZooKeeperService:name0=StandaloneServer_port-1,name1=InMemoryDataTree
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:427)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:415)
at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:546)
at org.apache.zookeeper.jmx.MBeanRegistry.unregister(MBeanRegistry.java:115)
at org.apache.zookeeper.jmx.MBeanRegistry.unregister(MBeanRegistry.java:132)
at org.apache.zookeeper.server.ZooKeeperServer.unregisterJMX(ZooKeeperServer.java:465)
at org.apache.zookeeper.server.ZooKeeperServer.shutdown(ZooKeeperServer.java:458)
at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:116)
at org.springframework.xd.dirt.zookeeper.EmbeddedZooKeeper$ServerRunnable.run(EmbeddedZooKeeper.java:240)
at java.lang.Thread.run(Thread.java:745)
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.890 s
[INFO] Finished at: 2015-04-11T23:14:01-07:00
[INFO] Final Memory: 35M/455M
[INFO] ------------------------------------------------------------------------
It's not clear what you are asking...
Running com.acme.FeedSourceModuleIntegrationTest
...
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.026 sec - in com.acme.FeedSourceModuleIntegrationTest
Indicates the test ran ok (no errors or failures).
When I run it in STS, yes there's a delay during the startup (it takes a while to start the single node) but the test runs to successful completion, giving me a green bar.
Related
I am using Tesseract for Java for OCR text extraction, which makes JNI native calls to Leptonica system library.
When running a Quarkus application in JVM mode in a Linux-based host it resolves JNI method calls correctly,
and all works as expected. But when running as a native image, an UnsatisfiedLinkError exception is thrown when making a call to pixReadMem metohd, which is not found.
The stack trace when running the native image is:
2022-12-16 08:20:29,736 ERROR [org.jbo.res.rea.com.cor.AbstractResteasyReactiveContext] (executor-thread-0) Request failed: java.lang.UnsatisfiedLinkError: Error looking up function 'pixReadMem': com.sun.jna.Native.findSymbol(JLjava/lang/String;)J [symbol: Java_com_sun_jna_Native_findSymbol or Java_com_sun_jna_Native_findSymbol__JLjava_lang_String_2]
at com.sun.jna.Function.<init>(Function.java:252)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:600)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:576)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:562)
at com.sun.jna.Library$Handler.invoke(Library.java:243)
at com.sun.proxy.$Proxy107.pixReadMem(Unknown Source)
at com.itextpdf.pdfocr.tesseract4.TesseractOcrUtil.readPix(TesseractOcrUtil.java:662)
at com.itextpdf.pdfocr.tesseract4.TesseractOcrUtil.readPix(TesseractOcrUtil.java:641)
at com.itextpdf.pdfocr.tesseract4.ImagePreprocessingUtil.preprocessImage(ImagePreprocessingUtil.java:166)
at com.itextpdf.pdfocr.tesseract4.Tesseract4LibOcrEngine.getOcrResultForSinglePage(Tesseract4LibOcrEngine.java:314)
at com.itextpdf.pdfocr.tesseract4.Tesseract4LibOcrEngine.doTesseractOcr(Tesseract4LibOcrEngine.java:189)
at com.itextpdf.pdfocr.tesseract4.AbstractTesseract4OcrEngine.processInputFiles(AbstractTesseract4OcrEngine.java:494)
at com.itextpdf.pdfocr.tesseract4.AbstractTesseract4OcrEngine.doImageOcr(AbstractTesseract4OcrEngine.java:232)
at es.gen.quarkus.ocr.service.TesseractService.extratTextFromJPG(TesseractService.java:42)
at es.gen.quarkus.ocr.service.TesseractService_ClientProxy.extratTextFromJPG(Unknown Source)
at es.gen.quarkus.ocr.service.OCRService.extractTextFromPDF(OCRService.java:34)
at es.gen.quarkus.ocr.service.OCRService_ClientProxy.extractTextFromPDF(Unknown Source)
at es.gen.quarkus.ocr.resource.OCRResource.extractTextFromPDF(OCRResource.java:46)
at es.gen.quarkus.ocr.resource.OCRResource$quarkusrestinvoker$extractTextFromPDF_21209ffb320090ffe15503899b13ececc74cb601.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:114)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base#11.0.17/java.lang.Thread.run(Thread.java:829)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)`
```
I have tried to set Java system properties with no success:
- `java.library.path` (the current value includes the linux system folders).
- `jna.debug_load=true` does not log any information.
Add this to properties
quarkus.native.additional-build-args=--initialize-at-build-time=java.awt.image.DirectColorModel --trace-class-initialization=sun.awt.image.IntegerInterleavedRaster\\,java.awt.image.DataBufferByte\\,java.awt.Rectangle\\,java.awt.image.SinglePixelPackedSampleModel\\,sun.java2d.StateTrackableDelegate$2\\,java.awt.image.PackedColorModel\\,java.awt.image.DirectColorModel\\,java.awt.image.BufferedImage\\,java.awt.image.DataBuffer\\,java.awt.Toolkit\\,java.awt.color.ColorSpace$BuiltInSpace\\,sun.awt.image.IntegerComponentRaster\\,sun.awt.image.SunWritableRaster\\,java.awt.image.ComponentSampleModel\\,java.awt.image.ColorModel\\,java.awt.image.BandedSampleModel\\,java.awt.image.WritableRaster\\,java.awt.Image\\,java.awt.image.SampleModel\\,java.awt.image.Raster\\,java.awt.image.DataBufferInt\\,sun.java2d.StateTrackableDelegate\\,sun.awt.image.ByteBandedRaster
install libtesseract5 because latest code uses that. this is how I installed it
sudo add-apt-repository ppa:alex-p/tesseract-ocr5
sudo apt update
sudo apt install libtesseract5
then I manage to get the runner executable. no need to run install just mvn package -Pnative will do fine.
When I ran in my local and send a pdf, got another exception.
/quarkus-ocr$ ./target/quarkus-ocr-1.0.0-SNAPSHOT-runner
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2022-12-20 19:09:30,419 INFO [com.zhe.qua.ocr.res.OCRResource] (executor-thread-0) Extracting text from PDF: Profile.pdf (58739 bytes)
java.io.IOException: Error: Could not find referenced cmap stream Identity-H
at org.apache.fontbox.cmap.CMapParser.getExternalCMap(CMapParser.java:492)
at org.apache.fontbox.cmap.CMapParser.parsePredefined(CMapParser.java:99)
at org.apache.pdfbox.pdmodel.font.CMapManager.getPredefinedCMap(CMapManager.java:55)
at org.apache.pdfbox.pdmodel.font.PDType0Font.readEncoding(PDType0Font.java:287)
at org.apache.pdfbox.pdmodel.font.PDType0Font.<init>(PDType0Font.java:204)
at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:97)
at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:146)
at org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:66)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:966)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:541)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:516)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:155)
at org.apache.pdfbox.text.LegacyPDFStreamEngine.processPage(LegacyPDFStreamEngine.java:155)
at org.apache.pdfbox.text.PDFTextStripper.processPage(PDFTextStripper.java:363)
at org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:291)
at org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:238)
at org.apache.pdfbox.text.PDFTextStripper.getText(PDFTextStripper.java:202)
at com.zheta.quarkus.ocr.service.OCRService.extractTextFromPDF(OCRService.java:30)
at com.zheta.quarkus.ocr.service.OCRService_ClientProxy.extractTextFromPDF(Unknown Source)
at com.zheta.quarkus.ocr.resource.OCRResource.extractTextFromPDF(OCRResource.java:43)
at com.zheta.quarkus.ocr.resource.OCRResource$quarkusrestinvoker$extractTextFromPDF_924fb8ae275125151f52704028fdf25205ebf12f.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:114)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base#17.0.5/java.lang.Thread.run(Thread.java:833)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)
2022-12-20 19:09:30,429 INFO [com.zhe.qua.ocr.res.OCRResource] (executor-thread-0) Extracted text from PDF: Profile.pdf (58739 bytes) finished in 10 ms
build log to show versions
mintozzy#laptop:~/tmp/quarkus-ocrmvn clean package -Pnativer
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.zheta.quarkus:quarkus-ocr >--------------------
[INFO] Building quarkus-ocr 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # quarkus-ocr ---
[INFO] Deleting /home/mintozzy/tmp/quarkus-ocr/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # quarkus-ocr ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- quarkus-maven-plugin:2.14.3.Final:generate-code (default) # quarkus-ocr ---
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # quarkus-ocr ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /home/mintozzy/tmp/quarkus-ocr/target/classes
[INFO]
[INFO] --- quarkus-maven-plugin:2.14.3.Final:generate-code-tests (default) # quarkus-ocr ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # quarkus-ocr ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/mintozzy/tmp/quarkus-ocr/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) # quarkus-ocr ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M7:test (default-test) # quarkus-ocr ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # quarkus-ocr ---
[INFO] Building jar: /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT.jar
[INFO]
[INFO] --- quarkus-maven-plugin:2.14.3.Final:build (default) # quarkus-ocr ---
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-ocr-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-ocr-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM 22.3.0 Java 17 EE (Java Version 17.0.5+9-LTS-jvmci-22.3-b07)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] /home/mintozzy/.sdkman/candidates/java/graalvm-ee-java17-22.3.0/bin/native-image -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dlogging.initial-configurator.min-level=500 -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Duser.language=en -J-Duser.country=GB -J-Dfile.encoding=UTF-8 --features=io.quarkus.runner.Feature,io.quarkus.runtime.graal.ResourcesFeature,io.quarkus.runtime.graal.DisableLoggingFeature,io.quarkus.awt.runtime.graal.AwtFeature,io.quarkus.awt.runtime.graal.DarwinAwtFeature -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-opens=java.base/java.text=ALL-UNNAMED -J--add-opens=java.base/java.io=ALL-UNNAMED -J--add-opens=java.base/java.lang.invoke=ALL-UNNAMED -J--add-opens=java.base/java.util=ALL-UNNAMED -H:+CollectImageBuildStatistics -H:ImageBuildStatisticsFile=quarkus-ocr-1.0.0-SNAPSHOT-runner-timing-stats.json -H:BuildOutputJSONFile=quarkus-ocr-1.0.0-SNAPSHOT-runner-build-output-stats.json --initialize-at-build-time=java.awt.image.DirectColorModel --trace-class-initialization=sun.awt.image.IntegerInterleavedRaster,java.awt.image.DataBufferByte,java.awt.Rectangle,java.awt.image.SinglePixelPackedSampleModel,sun.java2d.StateTrackableDelegate\$2,java.awt.image.PackedColorModel,java.awt.image.DirectColorModel,java.awt.image.BufferedImage,java.awt.image.DataBuffer,java.awt.Toolkit,java.awt.color.ColorSpace\$BuiltInSpace,sun.awt.image.IntegerComponentRaster,sun.awt.image.SunWritableRaster,java.awt.image.ComponentSampleModel,java.awt.image.ColorModel,java.awt.image.BandedSampleModel,java.awt.image.WritableRaster,java.awt.Image,java.awt.image.SampleModel,java.awt.image.Raster,java.awt.image.DataBufferInt,sun.java2d.StateTrackableDelegate,sun.awt.image.ByteBandedRaster -H:+AllowFoldMethods -J-Djava.awt.headless=true --no-fallback --link-at-build-time -H:+ReportExceptionStackTraces -H:-AddAllCharsets --enable-url-protocols=http -H:NativeLinkerOption=-no-pie -H:-UseServiceLoaderFeature -H:+StackTrace -J--add-exports=org.graalvm.sdk/org.graalvm.nativeimage.impl=ALL-UNNAMED -J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED quarkus-ocr-1.0.0-SNAPSHOT-runner -jar quarkus-ocr-1.0.0-SNAPSHOT-runner.jar
========================================================================================================================
GraalVM Native Image: Generating 'quarkus-ocr-1.0.0-SNAPSHOT-runner' (executable)...
========================================================================================================================
[1/7] Initializing... (11.3s # 0.19GB)
Version info: 'GraalVM 22.3.0 Java 17 EE'
Java version info: '17.0.5+9-LTS-jvmci-22.3-b07'
C compiler: gcc (linux, x86_64, 9.4.0)
Garbage collector: Serial GC
5 user-specific feature(s)
- io.quarkus.awt.runtime.graal.AwtFeature
- io.quarkus.awt.runtime.graal.DarwinAwtFeature
- io.quarkus.runner.Feature: Auto-generated class by Quarkus from the existing extensions
- io.quarkus.runtime.graal.DisableLoggingFeature: Disables INFO logging during the analysis phase for the [org.jboss.threads] categories
- io.quarkus.runtime.graal.ResourcesFeature: Register each line in META-INF/quarkus-native-resources.txt as a resource on Substrate VM
# Printing class initialization configuration to: /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/reports/class_initialization_configuration_20221220_193027.csv
# Printing class initialization configuration to: /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/reports/class_initialization_configuration_20221220_193129.csv
# Printing class initialization dependencies to: /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/reports/class_initialization_dependencies_20221220_193205.dot
# Printing class initialization report to: /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/reports/class_initialization_report_20221220_193205.csv
[2/7] Performing analysis... [*********] (98.7s # 2.15GB)
15,243 (88.71%) of 17,182 classes reachable
25,842 (62.65%) of 41,250 fields reachable
88,340 (59.44%) of 148,629 methods reachable
516 classes, 118 fields, and 2,372 methods registered for reflection
179 classes, 1,537 fields, and 2,092 methods registered for JNI access
7 native libraries: dl, freetype, m, pthread, rt, stdc++, z
[3/7] Building universe... (9.6s # 2.71GB)
[4/7] Parsing methods... [***] (11.5s # 2.63GB)
[5/7] Inlining methods... [***] (4.4s # 1.94GB)
[6/7] Compiling methods... [**************] (214.3s # 1.47GB)
[7/7] Creating image... (13.4s # 2.06GB)
46.92MB (44.56%) for code area: 51,972 compilation units
55.45MB (52.66%) for image heap:1,114,462 objects and 302 resources
2.93MB ( 2.78%) for other data
105.29MB in total
------------------------------------------------------------------------------------------------------------------------
Top 10 packages in code area: Top 10 object types in image heap:
3.17MB com.oracle.svm.core.code 12.28MB o.a.c.imaging.common.itu_t4.HuffmanTree$Node
1.66MB sun.security.ssl 9.53MB byte[] for code metadata
1.37MB java.util 4.56MB byte[] for general heap data
1.12MB com.oracle.svm.core.jni 4.53MB byte[] for embedded resources
986.77KB sun.font 3.77MB byte[] for java.lang.String
971.69KB io.netty.buffer 3.75MB java.lang.String
914.40KB com.sun.crypto.provider 2.74MB java.lang.Class
881.87KB java.lang.invoke 2.48MB java.lang.Object[]
718.86KB java.lang 1.60MB int[]
641.56KB io.vertx.core.http.impl 1.58MB java.util.HashMap$Node
34.23MB for 623 more packages 7.67MB for 3524 more object types
------------------------------------------------------------------------------------------------------------------------
16.3s (4.3% of total time) in 146 GCs | Peak RSS: 4.75GB | CPU load: 6.64
------------------------------------------------------------------------------------------------------------------------
Produced artifacts:
/home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-ocr-1.0.0-SNAPSHOT-runner (executable)
/home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-ocr-1.0.0-SNAPSHOT-runner-build-output-stats.json (json)
/home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-ocr-1.0.0-SNAPSHOT-runner-timing-stats.json (raw)
/home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-ocr-1.0.0-SNAPSHOT-runner.build_artifacts.txt (txt)
========================================================================================================================
Finished generating 'quarkus-ocr-1.0.0-SNAPSHOT-runner' in 6m 14s.
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] objcopy --strip-debug quarkus-ocr-1.0.0-SNAPSHOT-runner
[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 381602ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:25 min
[INFO] Finished at: 2022-12-20T19:36:34Z
[INFO] ------------------------------------------------------------------------
what libraries it depends
mintozzy#laptop:~/tmp/quarkus-ocr$ ldd ./target/quarkus-ocr-1.0.0-SNAPSHOT-runner
linux-vdso.so.1 (0x00007fff0f5ff000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fdbd2522000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdbd23d3000)
libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fdbd2314000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fdbd22f8000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fdbd22d5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fdbd22cf000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fdbd22b2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdbd20c0000)
/lib64/ld-linux-x86-64.so.2 (0x00007fdbd2720000)
libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fdbd2088000)
I need help to understand why I can't connect to my container. Neither 5672 or 15672 ports will respond. Docker shows the container up and running but no communication whatsoever can reach it. I thought it was a firewall issue, ran these commands with no avail:
netsh advfirewall firewall add rule name="RabbitMQ Management" dir=in action=allow protocol=TCP localport=15672
netsh advfirewall firewall add rule name="RabbitMQ" dir=in action=allow protocol=TCP localport=5672
This is my command:
docker run -d -p 15672:15672 -p 5672:5672 -p 15692:15692 --name leap-rabbit rabbitmq:3.10.1-management-alpine
This is the startup response from the container:
leap-rabbitmq | 2022-05-20 17:27:52.859804+00:00 [info] <0.221.0> Running boot step cluster_name defined by app rabbit
leap-rabbitmq | 2022-05-20 17:27:52.860046+00:00 [info] <0.221.0> Initialising internal cluster ID to 'rabbitmq-cluster-id-ZJg5LIrVcEx8-VxjZ46hNw'
leap-rabbitmq | 2022-05-20 17:27:52.900450+00:00 [info] <0.221.0> Running boot step direct_client defined by app rabbit
leap-rabbitmq | 2022-05-20 17:27:52.900598+00:00 [info] <0.221.0> Running boot step rabbit_management_load_definitions defined by app rabbitmq_management
leap-rabbitmq | 2022-05-20 17:27:52.900832+00:00 [info] <0.678.0> Resetting node maintenance status
leap-rabbitmq | 2022-05-20 17:27:52.917408+00:00 [info] <0.737.0> Management plugin: HTTP (non-TLS) listener started on port 15672
leap-rabbitmq | 2022-05-20 17:27:52.917548+00:00 [info] <0.765.0> Statistics database started.
leap-rabbitmq | 2022-05-20 17:27:52.917617+00:00 [info] <0.764.0> Starting worker pool 'management_worker_pool' with 3 processes in it
leap-rabbitmq | 2022-05-20 17:27:52.927564+00:00 [info] <0.779.0> Prometheus metrics: HTTP (non-TLS) listener started on port 15692
leap-rabbitmq | 2022-05-20 17:27:52.927840+00:00 [info] <0.678.0> Ready to start client connection listeners
leap-rabbitmq | 2022-05-20 17:27:52.929580+00:00 [info] <0.823.0> started TCP listener on [::]:5672
leap-rabbitmq | completed with 4 plugins.
leap-rabbitmq | 2022-05-20 17:27:53.013224+00:00 [info] <0.678.0> Server startup complete; 4 plugins started.
leap-rabbitmq | 2022-05-20 17:27:53.013224+00:00 [info] <0.678.0> * rabbitmq_prometheus
leap-rabbitmq | 2022-05-20 17:27:53.013224+00:00 [info] <0.678.0> * rabbitmq_management
leap-rabbitmq | 2022-05-20 17:27:53.013224+00:00 [info] <0.678.0> * rabbitmq_web_dispatch
leap-rabbitmq | 2022-05-20 17:27:53.013224+00:00 [info] <0.678.0> * rabbitmq_management_agent
And this is the docker inspect output:
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {
"15672/tcp": [
{
"HostIp": "",
"HostPort": "15672"
}
],
"15692/tcp": [
{
"HostIp": "",
"HostPort": "15692"
}
],
"5672/tcp": [
{
"HostIp": "",
"HostPort": "5672"
}
]
},
I'm always getting the not found error in the 6th line(Dsonar.branch.name) of the code from my Jenkinsfile below. If I swap the 6th line as Dsonar.sources it says the source is not found.
withCredentials([string(credentialsId: 'sonar_token', variable: 'token')]) {
sh"""
mvn sonar:sonar \
-Dsonar.projectKey=app \
-Dsonar.host.url=https://sonarqube.test.dev \
-Dsonar.login="917336a835asdf3528c863498"\
-Dsonar.exclusions=$env.WORKSPACE/apps/core-app/src/test
-Dsonar.branch.name=$env.BRANCH_NAME
-Dsonar.sources=$env.WORKSPACE/apps/
-Dsonar.exclusions=$env.WORKSPACE/registry/apps/support-app/src/test
-Dsonar.exclusions=src/apitest/**,src/test/**
"""
}
Error below,
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:13 min
[INFO] Finished at: 2022-01-18T07:15:59Z
[INFO] ------------------------------------------------------------------------
+ -Dsonar.branch.name=feature/docker-build
/home/jenkins/agent/workspace/nt-registry_feature_docker-build#tmp/durable-d9e51887/script.sh: 3: -Dsonar.branch.name=feature/docker-build: not found
I have used the function below instead sh command. It works as expected.
sonarResult = sonarqubeScan(
serverName: 'sonarqube',
sonarScannerExec: "$env.WORKSPACE/sonar-scanner-4.0.0.1744-linux/bin/sonar-scanner",
credentialsId: 'sonar_token',
sources: ".",
addlArgs: config.sonar.sonarAdditionalArguments
)
I've set up my package.json to run jest with coverage :
"scripts": {
"sonar": "node sonar-project.js",
"test": "jest --coverage",
"test-analyze": "npm run test && npm run sonar"
},
running npm test will ouput correct lcov.info and lcov-report in HTML format. Standard ouput looks like:
C:\sandbox2\frontend>npm test
> sandbox2-front#0.0.1 test C:\sandbox2\frontend
> jest --coverage
PASS test/Converter.spec.ts
√ Test celsius to Fahrentheit (3 ms)
√ kelvinToCelcius
--------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
All files | 89.66 | 66.67 | 66.67 | 89.66 |
Converter.ts | 89.66 | 66.67 | 66.67 | 89.66 | 21,28-29
--------------|---------|----------|---------|---------|-------------------
Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 0.858 s, estimated 1 s
Ran all test suites.
I'm running the (supposedly) same command through Maven with frontend-maven-plugin, with the ad hoc configuration in my pom.xml:
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<configuration>
<workingDirectory>.</workingDirectory>
<installDirectory>target</installDirectory>
<npmRegistryURL>https://ci.knowesia.com/npmjs/</npmRegistryURL>
<nodeVersion>${node.version}</nodeVersion>
</configuration>
<execution>
<id>npm-test</id>
<goals>
<goal>npm</goal>
</goals>
<phase>test</phase>
<configuration>
<arguments>run test</arguments>
</configuration>
</execution>
Despite everything looks fine, in the end my coverage reports (lcov.info, converage-final.json) are regenerated but empty.
This can be seen from standard output (you'll notice that no coverage info is displayed here):
[INFO] Running 'npm test --registry=https://internalciurl/npmjs/' in C:\sandbox2\frontend
[INFO]
[INFO] > sandbox2-front#0.0.1 test C:\sandbox2\frontend
[INFO] > jest --coverage
[INFO]
[INFO] PASS test/Converter.spec.ts
[INFO] â?? Test celsius to Fahrentheit (3 ms)
[INFO] â?? kelvinToCelcius
[INFO]
[INFO] ----------|---------|----------|---------|---------|-------------------
[INFO] File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
[INFO] ----------|---------|----------|---------|---------|-------------------
[INFO] All files | 0 | 0 | 0 | 0 |
[INFO] ----------|---------|----------|---------|---------|-------------------
[INFO] Test Suites: 1 passed, 1 total
[INFO] Tests: 2 passed, 2 total
[INFO] Snapshots: 0 total
[INFO] Time: 0.94 s, estimated 1 s
[INFO] Ran all test suites.
Are there any specific configuration to do? Is it an issue in the frontend-maven-plugin?
I am using Spock framework for testing (1.0-groovy-2.4 release). Junit offers this option to run a specific test using the command line (with Maven):
mvn -Dtest=TestCircle#mytest test
Question: How can I do this with Spock?
This version has a dependency on Junit 4.12, it is stated in Junit documentation that this feature is supported only for Junit 4.x, basically Spock should propose something similar.
I use:
Windows: mvn -Dtest="TestCircle#my test" test
*Nix: mvn "-Dtest=TestCircle#my test" test
It works perfectly with surefire 2.19.1 and junit 4.8.1.
The following is the code example and the execution output:
import spock.lang.Specification
class HelloSpec extends Specification {
def sayHello() {
given: "A person's name is given as a method parameter."
def greeting = "Hello Petri";
expect: "Should say hello to the person whose name is given as a method parameter"
greeting == "Hello Petri";
println "hello from HelloSpec"
}
def sayHi() {
expect:
1==1
println "sayHi from HelloSpec"
}
def "say hi to spock" () {
expect:
true
println "say hi to spock from HelloSpec"
}
}
# mvn test "-Dtest=HelloSpec#say hi to spock"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Auto Test 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # auto-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # auto-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # auto-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 122 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # auto-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- gmaven-plugin:1.4:testCompile (compile-test) # auto-test ---
[INFO] Compiled 42 Groovy classes
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) # auto-test ---
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running HelloSpec
say hi to spock from HelloSpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.558 sec - in HelloSpec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.169s
[INFO] Finished at: Fri Jul 01 14:19:20 CST 2016
[INFO] Final Memory: 31M/736M
[INFO] ------------------------------------------------------------------------
# mvn test "-Dtest=HelloSpec#sayHi"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Auto Test 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # auto-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # auto-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # auto-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 122 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # auto-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- gmaven-plugin:1.4:testCompile (compile-test) # auto-test ---
[INFO] Compiled 42 Groovy classes
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) # auto-test ---
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running HelloSpec
sayHi from HelloSpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.539 sec - in HelloSpec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.187s
[INFO] Finished at: Fri Jul 01 14:19:49 CST 2016
[INFO] Final Memory: 31M/736M
[INFO] ------------------------------------------------------------------------
# mvn test "-Dtest=HelloSpec#sayHello"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Auto Test 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # auto-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # auto-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # auto-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 122 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # auto-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- gmaven-plugin:1.4:testCompile (compile-test) # auto-test ---
[INFO] Compiled 42 Groovy classes
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) # auto-test ---
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running HelloSpec
hello from HelloSpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.515 sec - in HelloSpec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.170s
[INFO] Finished at: Fri Jul 01 14:20:14 CST 2016
[INFO] Final Memory: 31M/736M
[INFO] ------------------------------------------------------------------------
Hope this help.
After a further investigation, the answer is most probably: No, you can't invoke specific test methods with Spock using that Surefire Plugin feature. Below the reason.
Given the following Spock test case:
import spock.lang.Specification
class HelloSpec extends Specification {
def hello = new Main();
def sayHello() {
given: "A person's name is given as a method parameter."
def greeting = hello.sayHello("Petri");
expect: "Should say hello to the person whose name is given as a method parameter"
greeting == "Hello Petri";
println "hello from HelloSpec"
}
}
And given the following plugins configuration:
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<goals>
<goal>addTestSources</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<sources>
<fileset>
<directory>${pom.basedir}/src/test/java</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</fileset>
</sources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<includes>
<include>**/*Test.java</include>
<include>**/*Spec.java</include>
</includes>
</configuration>
</plugin>
It runs fine as part of the Maven test phase executing mvn clean test:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.sample.HelloSpec
hello from HelloSpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.314 sec - in com.sample.HelloSpec
Even executing mvn clean test -Dtest=HelloSpec you get exactly the same result as above, successfully execution.
So, why we can't run a single method?
If we execute the javap command on the HelloSpec sample test above we get the following output:
Compiled from "HelloSpec.groovy"
public class com.sample.HelloSpec extends spock.lang.Specification implements groovy.lang.GroovyObject {
public static transient boolean __$stMC;
public com.sample.HelloSpec();
public void $spock_feature_0_0();
protected groovy.lang.MetaClass $getStaticMetaClass();
public groovy.lang.MetaClass getMetaClass();
public void setMetaClass(groovy.lang.MetaClass);
public java.lang.Object invokeMethod(java.lang.String, java.lang.Object);
public java.lang.Object getProperty(java.lang.String);
public void setProperty(java.lang.String, java.lang.Object);
public java.lang.Object getHello();
public void setHello(java.lang.Object);
}
So in the generated bytecode there is no sayHello method, because Spock changes methods name in order to allow spaces in them. So the method name you write is never actually the real method name as part of the compiled class.
In this case, the method name is most probably $spock_feature_0_0, not something really friendly.
This is also confirmed in this answer and the comments of Peter Niederwieser, author of Spock actually, so a more than reliable source.
You could try running the following:
mvn clean test -Dtest=HelloSpec#*spock*
which should indeed match the real method name, but you would however get an error
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.sample.HelloSpec
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.007 sec <<< FAILURE! - in com.sample.HelloSpec
initializationError(org.junit.runner.manipulation.Filter) Time elapsed: 0.006 sec <<< ERROR!
java.lang.Exception: No tests found matching Method $spock_feature_0_0(com.sample.HelloSpec) from org.junit.internal.requests.ClassRequest#282ba1e
at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:35)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:275)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:149)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Results :
Tests in error:
Filter.initializationError » No tests found matching Method $spock_feature_0_...
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
This is most likely because with the direct invocation name we are bypassing the glue between JUnit and Spock and as such the execution fails.
Have you tried this (https://groups.google.com/forum/#!topic/spockframework/KVDkA9QxC4U):
Windows: mvn -Dtest="TestCircle#my test" test
*Nix: mvn "-Dtest=TestCircle#my test" test