On Monday, May 13, 2019 at 12:52:26 PM UTC+2, Vijay Nanekar wrote:
>
>
> Yes, but I execute this in infinite loop which will continuously request 
> to dump execution data.
>

According to the code that you shown:

Your infinite loop "while (true)" in method main handles connections from 
different clients - "server.accept" waits for new client, then new thread 
is created, then loop continues.
Each such thread performs "visitDumpCommand" *once and only once at its 
start*, then your loop "while (reader.read())" reads data and waits for 
more data.
Note that each client JVM connects only once at start of JaCoCo agent, so
client JVM starts, JaCoCo agent connects to your server, immediately 
receives request, and responds by writing  data which was collected only 
till this moment of time,
in absence of other requests, client JVM will write data next time only at 
the termination, using your terminology - only when "service" stops.

Hope now clear how code of your server works.

Thus in order to receive full data
either you gracefully stop your client JVMs at the end of your tests,
or as Marc said - you need to find a way for your server to request data at 
the end of your tests.

We can't say how to change code of this server, because there are many 
options - maybe you want to receive data from all connected clients when 
you terminate server, or maybe using some other trigger, or maybe you want 
to receive data periodically, etc.


Regards,
Evgeny

-- 
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/da079aca-7af2-4ace-be37-9552bea398ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to