@@ -72,43 +72,6 @@ public function testNotPrimaryKeepsConnectionPool(): void
7272 $ this ->assertSame ($ totalConnectionsCreated , $ this ->getTotalConnectionsCreated ());
7373 }
7474
75- /** @see https://github.com/mongodb/specifications/tree/master/source/connections-survive-step-down/tests#not-primary-reset-connection-pool */
76- public function testNotPrimaryResetConnectionPool (): void
77- {
78- $ runOn = [(object ) ['minServerVersion ' => '4.0.0 ' , 'maxServerVersion ' => '4.0.999 ' , 'topology ' => [self ::TOPOLOGY_REPLICASET ]]];
79- $ this ->checkServerRequirements ($ runOn );
80-
81- // Set a fail point
82- $ this ->configureFailPoint ([
83- 'configureFailPoint ' => 'failCommand ' ,
84- 'mode ' => ['times ' => 1 ],
85- 'data ' => [
86- 'failCommands ' => ['insert ' ],
87- 'errorCode ' => self ::NOT_PRIMARY ,
88- ],
89- ]);
90-
91- $ totalConnectionsCreated = $ this ->getTotalConnectionsCreated ();
92-
93- // Execute an insert into the test collection of a {test: 1} document.
94- try {
95- $ this ->insertDocuments (1 );
96- } catch (BulkWriteException $ e ) {
97- // Verify that the insert failed with an operation failure with 10107 code.
98- $ this ->assertSame (self ::NOT_PRIMARY , $ e ->getCode ());
99- }
100-
101- /* Verify that the connection pool has been cleared and that a new
102- * connection has been created. Use ">=" to allow for the possibility
103- * that the server created additional connections unrelated to this
104- * test. */
105- $ this ->assertGreaterThanOrEqual ($ totalConnectionsCreated + 1 , $ this ->getTotalConnectionsCreated ());
106-
107- // Execute an insert into the test collection of a {test: 1} document and verify that it succeeds.
108- $ result = $ this ->insertDocuments (1 );
109- $ this ->assertSame (1 , $ result ->getInsertedCount ());
110- }
111-
11275 /** @see https://github.com/mongodb/specifications/tree/master/source/connections-survive-step-down/tests#shutdown-in-progress-reset-connection-pool */
11376 public function testShutdownResetConnectionPool (): void
11477 {
0 commit comments