From c5b87c0ecc10b42be8a254fb0b2cb03dd49ce319 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Mon, 26 May 2025 15:21:49 +0200 Subject: [PATCH] PHPLIB-1674: Fix timeouts in CSE custom endpoint test (#1706) --- tests/SpecTests/ClientSideEncryptionSpecTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/SpecTests/ClientSideEncryptionSpecTest.php b/tests/SpecTests/ClientSideEncryptionSpecTest.php index b4d2986e2..8a8735547 100644 --- a/tests/SpecTests/ClientSideEncryptionSpecTest.php +++ b/tests/SpecTests/ClientSideEncryptionSpecTest.php @@ -762,7 +762,7 @@ public function testCustomEndpoint(Closure $test): void 'kmsProviders' => [ 'azure' => Context::getAzureCredentials() + ['identityPlatformEndpoint' => 'doesnotexist.invalid:443'], 'gcp' => Context::getGCPCredentials() + ['endpoint' => 'doesnotexist.invalid:443'], - 'kmip' => ['endpoint' => 'doesnotexist.local:5698'], + 'kmip' => ['endpoint' => 'doesnotexist.invalid:5698'], ], 'tlsOptions' => [ 'kmip' => Context::getKmsTlsOptions(), @@ -810,9 +810,9 @@ static function (self $test, ClientEncryption $clientEncryption, ClientEncryptio ]; yield 'Test 4' => [ - static function (self $test, ClientEncryption $clientEncryption, ClientEncryption $clientEncryptionInvalid) use ($awsMasterKey): void { + static function (self $test, ClientEncryption $clientEncryption, ClientEncryption $clientEncryptionInvalid) use ($kmipMasterKey): void { $test->expectException(ConnectionException::class); - $clientEncryption->createDataKey('aws', ['masterKey' => $awsMasterKey + ['endpoint' => 'kms.us-east-1.amazonaws.com:12345']]); + $clientEncryption->createDataKey('kmip', ['masterKey' => $kmipMasterKey + ['endpoint' => 'localhost:12345']]); }, ]; @@ -873,7 +873,7 @@ static function (self $test, ClientEncryption $clientEncryption, ClientEncryptio $test->assertSame('test', $clientEncryption->decrypt($encrypted)); $test->expectException(RuntimeException::class); - $test->expectExceptionMessageMatches('#doesnotexist.local#'); + $test->expectExceptionMessageMatches('#doesnotexist.invalid#'); $clientEncryptionInvalid->createDataKey('kmip', ['masterKey' => $kmipMasterKey]); }, ]; @@ -890,10 +890,10 @@ static function (self $test, ClientEncryption $clientEncryption, ClientEncryptio yield 'Test 12' => [ static function (self $test, ClientEncryption $clientEncryption, ClientEncryption $clientEncryptionInvalid) use ($kmipMasterKey): void { - $kmipMasterKey['endpoint'] = 'doesnotexist.local:5698'; + $kmipMasterKey['endpoint'] = 'doesnotexist.invalid:5698'; $test->expectException(RuntimeException::class); - $test->expectExceptionMessageMatches('#doesnotexist.local#'); + $test->expectExceptionMessageMatches('#doesnotexist.invalid#'); $clientEncryption->createDataKey('kmip', ['masterKey' => $kmipMasterKey]); }, ];