Hi, 

I am attempting to get code coverage for integration tests of a Websphere 
Liberty application running inside a docker container.

here is the error that I am receiving: 

    java.net.ConnectException: Connection refused (Connection refused)
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at 
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at 
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at java.net.Socket.connect(Socket.java:538)
        at java.net.Socket.<init>(Socket.java:434)
        at java.net.Socket.<init>(Socket.java:244)

My jvm.options file that I inject into the server config directory looks 
like this 

-Xshareclasses:none
-javaagent:/opt/ibm/wlp/lib/jacocoagent.jar=destfile=/jacoco/jacoco-it.exec,classdumpdir=/jacoco/classdumpdir,output=tcpserver,address=localhost

As background information:
- I have attempted with output=file and get a 0bytes exec file, I think 
this may be to do with how the container exits and kills the process before 
the dump completes so I have resorted to trying with tcpserver
- I use gradle as a build tool (not maven with jacoco-maven-plugin)
- the Jacoco/classdumpdir directory set for classdumpdir contains all of 
the classes that I wish to get coverage on
- I am running the code to request the dump after each test runs (the 
container is still up)


for the tcpserver option I have used the code 
provided 
https://www.eclemma.org/jacoco/trunk/doc/examples/java/ExecutionDataClient.java 

It seems like I am doing everything right, just cannot get the coverage.

Help is greatly appreciated,
Charlee

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/a6d8de6e-ee13-4b06-9779-4effeaf8c7ff%40googlegroups.com.

Reply via email to