Skip to content

Commit a0a0637

Browse files
committed
fix: ensure key is inserted
1 parent c27df1d commit a0a0637

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/integration/client-side-encryption/driver.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,16 +490,17 @@ describe('Client Side Encryption Functional', function () {
490490
});
491491
await keyVaultClient.connect();
492492

493-
commandsStarted = [];
494-
keyVaultClient.on('commandStarted', ev => commandsStarted.push(ev));
495-
496493
clientEncryption = new ClientEncryption(keyVaultClient, {
497494
keyVaultNamespace: 'keyvault.datakeys',
498495
kmsProviders: getLocalKmsProvider(),
499496
timeoutMS: 500
500497
});
501498

502499
key1Id = await clientEncryption.createDataKey('local');
500+
while ((await clientEncryption.getKey(key1Id)) == null);
501+
502+
commandsStarted = [];
503+
keyVaultClient.on('commandStarted', ev => commandsStarted.push(ev));
503504
});
504505

505506
afterEach(async function () {

0 commit comments

Comments
 (0)