Skip to content

Commit 7ed8dc5

Browse files
committed
Debug mongos server count
1 parent 7352454 commit 7ed8dc5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tests/SpecTests/RetryableReads/Prose2_RetryOnMongosTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ public function testRetryOnDifferentMongos(): void
3737
* TODO: Support topologies with 3+ servers by selecting only two and
3838
* recreating a client URI.
3939
*/
40+
if (count($this->manager->getServers() !== 2) {
41+
$this->fail('Unexpected server count: ' . count($this->manager->getServers()));
42+
}
43+
4044
assert(count($this->manager->getServers()) === 2);
4145

4246
// Step 2: Configure the following fail point on each mongos

tests/SpecTests/RetryableWrites/Prose4_RetryOnDifferentMongosTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ public function testRetryOnDifferentMongos(): void
3939
* TODO: Support topologies with 3+ servers by selecting only two and
4040
* recreating a client URI.
4141
*/
42+
if (count($this->manager->getServers() !== 2) {
43+
$this->fail('Unexpected server count: ' . count($this->manager->getServers()));
44+
}
45+
4246
assert(count($this->manager->getServers()) === 2);
4347

4448
// Step 2: Configure the following fail point on each mongos

0 commit comments

Comments
 (0)