Skip to content

Commit b8c0a16

Browse files
committed
Don't run killAllSessions on serverless
1 parent e41d6e7 commit b8c0a16

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

tests/SpecTests/TransactionsSpecTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,11 @@ protected function createTestCollection(): void
316316
*/
317317
private static function killAllSessions(): void
318318
{
319+
// killAllSessions is not supported on serverless, see CLOUDP-84298
320+
if (static::isServerless()) {
321+
return;
322+
}
323+
319324
$manager = static::createTestManager();
320325
$primary = $manager->selectServer(new ReadPreference('primary'));
321326

tests/UnifiedSpecTests/UnifiedTestRunner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function __construct(string $internalClientUri)
7878
/* Atlas prohibits killAllSessions. Inspect the connection string to
7979
* determine if we should avoid calling killAllSessions(). This does
8080
* mean that lingering transactions could block test execution. */
81-
if (strpos($internalClientUri, self::ATLAS_TLD) !== false) {
81+
if ($this->isServerless() || strpos($internalClientUri, self::ATLAS_TLD) !== false) {
8282
$this->allowKillAllSessions = false;
8383
}
8484
}

0 commit comments

Comments
 (0)