-
Type: Build Failure
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Python Drivers
-
Not Needed
-
Name of Failure:
test.test_bulk.TestBulkWriteConcern.test_write_concern_failure_unordered
Link to task:
Context of when and why the failure occurred:
Intermittent failure that usually goes away with a re-run.
Stack trace:
[2024/07/16 13:35:19.169] FAILURE: AssertionError: False is not true () [2024/07/16 13:35:19.169] self = <test.test_bulk.TestBulkWriteConcern testMethod=test_write_concern_failure_unordered> [2024/07/16 13:35:19.169] @client_context.require_replica_set [2024/07/16 13:35:19.169] @client_context.require_secondaries_count(1) [2024/07/16 13:35:19.169] def test_write_concern_failure_unordered(self): [2024/07/16 13:35:19.169] # Ensure we don't raise on wnote. [2024/07/16 13:35:19.169] coll_ww = self.coll.with_options(write_concern=WriteConcern(w=self.w)) [2024/07/16 13:35:19.169] result = coll_ww.bulk_write([DeleteOne({"something": "that does no exist"})], ordered=False) [2024/07/16 13:35:19.169] self.assertTrue(result.acknowledged) [2024/07/16 13:35:19.169] [2024/07/16 13:35:19.169] requests = [ [2024/07/16 13:35:19.169] InsertOne({"a": 1}), [2024/07/16 13:35:19.169] UpdateOne({"a": 3}, {"$set": {"a": 3, "b": 1}}, upsert=True), [2024/07/16 13:35:19.169] InsertOne({"a": 2}), [2024/07/16 13:35:19.169] ] [2024/07/16 13:35:19.169] # Replication wtimeout is a 'soft' error. [2024/07/16 13:35:19.169] # It shouldn't stop batch processing. [2024/07/16 13:35:19.169] try: [2024/07/16 13:35:19.169] self.cause_wtimeout(requests, ordered=False) [2024/07/16 13:35:19.169] except BulkWriteError as exc: [2024/07/16 13:35:19.169] details = exc.details [2024/07/16 13:35:19.169] self.assertEqual(exc.code, 65) [2024/07/16 13:35:19.169] else: [2024/07/16 13:35:19.169] self.fail("Error not raised") [2024/07/16 13:35:19.169] [2024/07/16 13:35:19.169] self.assertEqual(2, details["nInserted"]) [2024/07/16 13:35:19.169] self.assertEqual(1, details["nUpserted"]) [2024/07/16 13:35:19.169] self.assertEqual(0, len(details["writeErrors"])) [2024/07/16 13:35:19.169] # When talking to legacy servers there will be a [2024/07/16 13:35:19.169] # write concern error for each operation. [2024/07/16 13:35:19.169] > self.assertTrue(len(details["writeConcernErrors"]) > 1) [2024/07/16 13:35:19.169] E AssertionError: False is not true [2024/07/16 13:35:19.169] test/test_bulk.py:1047: AssertionError
- is related to
-
PYTHON-4741 Stop using rsSyncApplyStop in writeConcern error tests
- Backlog