Java socket reset error


Some issues with java/scala Play test suite using under the hood.
When testing api responses, there seem to be some socket reset issue making the tests fail.
Does happen randomly from time to time but for sure in a 10 mn long test

[info] - should return a fetchable BatteryLevel
[info] play - Starting application default Akka system.
[info] play - Shutdown application default Akka system.
[info] - should return an error when the device does not exist
Exception in thread "Thread-1" Exception in thread "Thread-5" Connection reset
at sbt.React.react(ForkTests.scala:117)
at sbt.ForkTests$$anonfun$mainTestTask$1$Acceptor$2$.run(ForkTests.scala:76)

Yes indeed, I did it.

1 Like

I wonder if this crash is happening at the start of your tests immediately after your socket is opened. If so, I’d consider sleeping for a second or two to wait for the listener to stabilise.


there is a 1 before the picture, the paste is wrong, I meant that this problem does occur very often for tests that last longer than 5 to 10 mn

1 Like

any update on this issue regarding the java circle ci server configuration? Circle Team?


It’s difficult to know what is happening here. I wonder if this could be a code/OS problem, and so asking CircleCI for assistance may not be the right approach, unless you can show it is a bug.

This dilemma is rather akin to folks obtaining web space from a host and asking the hosting company for assistance debugging WordPress - it isn’t scalable to ask the hosting/CI company to get involved with this sort of thing. I am not saying you don’t have a CI bug - just wondering if this is part of the usual pains of implementing CI, and that getting external assistance might be a good idea.

One practical thing you could do is to try to Dockerise these tests, assuming you are not relying on any system-level stuff. If you can do that you could get them to run locally, and then transferring them to CI is much less of a hassle, using Docker-in-Docker.

closed #9

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.