[JAVA-2314] Retry all functional tests once if a socket exception is thrown Created: 15/Sep/16  Updated: 16/Sep/16  Resolved: 16/Sep/16

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In our CI loop we are getting frequent test failures in the replica set configuration due to unanticipated primary failovers, resulting in a thrown MongoSocketException.

Consider implementing a test rule that retries all functional tests once upon a MongoSocketException being thrown. Due to the server selection implementation, the next try of the test will go into the server selection loop until the primary is re-located.



 Comments   
Comment by Jeffrey Yemin [ 16/Sep/16 ]

Looks like we've got around the worst of the problem in Jenkins by changing the replica set configuration to use equal priorities for all members. That reduces the chance of a failover that causes tests to fail.

Thanks emily.stolfo for pointing me in that direction.

Generated at Thu Feb 08 08:56:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.