@@ -121,6 +121,8 @@ This test requires a replica set with server version 4.0.
121121 document.
122122- Verify that the insert failed with an operation failure with 10107 code.
123123- Verify that the pool has been cleared following the instructions in section `How to verify the connection pool has been cleared `_
124+ - Execute an insert into the test collection of a ``{test: 1} ``
125+ document and verify that it succeeds.
124126
125127
126128Shutdown in progress - Reset Connection Pool
@@ -136,6 +138,8 @@ Perform the following operations on a client configured to NOT retry writes:
136138 document.
137139- Verify that the insert failed with an operation failure with 91 code.
138140- Verify that the pool has been cleared following the instructions in section `How to verify the connection pool has been cleared `_
141+ - Execute an insert into the test collection of a ``{test: 1} ``
142+ document and verify that it succeeds.
139143
140144
141145Interrupted at shutdown - Reset Connection Pool
@@ -151,13 +155,26 @@ Perform the following operations on a client configured to NOT retry writes:
151155 document.
152156- Verify that the insert failed with an operation failure with 11600 code.
153157- Verify that the pool has been cleared following the instructions in section `How to verify the connection pool has been cleared `_
158+ - Execute an insert into the test collection of a ``{test: 1} ``
159+ document and verify that it succeeds.
154160
155161
156162
157163Questions and Answers
158164---------------------
159165
160166Do we need to wait for re-election after the first test?
161- ``````````````````````````````````````````````````````````
167+ ````````````````````````````````````````````````````````
162168
163169Since test setup requires creation of a collection, a primary must exist, so subsequent tests will block in server selection until a primary is available again.
170+
171+
172+ Why do tests check for a successful insert operation in addition to checking that the pool was updated appropriately?
173+ `````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
174+
175+ Ensuring that we can run a successful insert after the primary steps down and without needing to recreate the
176+ ``MongoClient `` serves to test the resiliency of drivers in the event of a failover/election. Even though checking for
177+ a successful insert operation does not directly test functionality introduced in this specification, it is a
178+ straightforward way to test driver resiliency against a live replica set undergoing an election. This testing
179+ methodology is in contrast to the one adopted by the SDAM spec tests that rely entirely on mocking with no actual
180+ server communication.
0 commit comments