[JAVA-3742] Make ChangeStreamOperation tests more resilient Created: 24/May/20  Updated: 28/Oct/23  Resolved: 26/May/20

Status: Closed
Project: Java Driver
Component/s: Test Coverage
Affects Version/s: None
Fix Version/s: 3.12.5, 4.0.4, 4.1.0

Type: Improvement Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

ChangeStreamOperationSpecification tests fail occasionally because they assume that expected documents will be returned by the server in a single batch, even though the server makes no such guarantees (and in practice, does not behave consistently in this regard in single-sharded clusters).

The tests should be made more resilient by removing the assumption about single batches and instead combining multiple batches until the expected number of change stream documents have been received.



 Comments   
Comment by Githook User [ 26/May/20 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Fix test calling List.tail()

List.tail is not the same as List.tail() in Groovy

JAVA-3742
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/9f9d5c4243c62f45ec376dac9b88864aa23eb58c

Comment by Githook User [ 26/May/20 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Fix test calling List.tail()

List.tail is not the same as List.tail() in Groovy

JAVA-3742
Branch: 3.12.x
https://github.com/mongodb/mongo-java-driver/commit/56345703bddb0773cd69b5aa95834c89d7dab009

Comment by Githook User [ 26/May/20 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}

Message: Make ChangeStreamOperationSpecification more resilient

Remove assumption that expected change stream documents are
returned in a single batch.

JAVA-3742
Branch: 3.12.x
https://github.com/mongodb/mongo-java-driver/commit/2c7dc576e92d398f924acc1d8c1446d41af5761e

Comment by Githook User [ 26/May/20 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Fix test calling List.tail()

List.tail is not the same as List.tail() in Groovy

JAVA-3742
Branch: 4.0.x
https://github.com/mongodb/mongo-java-driver/commit/d82a6030126fe17e3076514f4a1eca3b7b5d28e1

Comment by Githook User [ 26/May/20 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}

Message: Make ChangeStreamOperationSpecification more resilient

Remove assumption that expected change stream documents are
returned in a single batch.

JAVA-3742
Branch: 4.0.x
https://github.com/mongodb/mongo-java-driver/commit/b4d6e64f8349ad7504c50aa00ab959147465a5df

Comment by Githook User [ 26/May/20 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}

Message: Make ChangeStreamOperationSpecification more resilient

Remove assumption that expected change stream documents are
returned in a single batch.

JAVA-3742
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/5c0375a5e1914f64dbcf43605fdcf76d95fe4c7e

Generated at Thu Feb 08 09:00:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.