Skip to content

Commit 5ed6f65

Browse files
committed
Do not execute killAllSessions on Atlas Data Lake
1 parent b432260 commit 5ed6f65

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tests/UnifiedSpecTests/UnifiedTestRunner.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,11 @@ public function __construct(string $internalClientUri)
8282

8383
/* Atlas prohibits killAllSessions. Inspect the connection string to
8484
* determine if we should avoid calling killAllSessions(). This does
85-
* mean that lingering transactions could block test execution. */
86-
if ($this->isServerless() || FunctionalTestCase::isAtlas($internalClientUri)) {
85+
* mean that lingering transactions could block test execution.
86+
*
87+
* Atlas Data Lake also does not support killAllSessions.
88+
*/
89+
if ($this->isServerless() || FunctionalTestCase::isAtlas($internalClientUri) || $this->isAtlasDataLake()) {
8790
$this->allowKillAllSessions = false;
8891
}
8992

@@ -314,6 +317,14 @@ private function getTopology(): string
314317
}
315318
}
316319

320+
private function isAtlasDataLake(): bool
321+
{
322+
$database = $this->internalClient->selectDatabase('admin');
323+
$buildInfo = $database->command(['buildInfo' => 1])->toArray()[0];
324+
325+
return ! empty($buildInfo->dataLake);
326+
}
327+
317328
/**
318329
* Return whether the connection is authenticated.
319330
*

0 commit comments

Comments
 (0)