Skip to content

Commit 81a7951

Browse files
ci(NODE-6861): retry flaky KMS failure tests (mongodb#4674)
1 parent 2078b01 commit 81a7951

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

test/integration/client-side-encryption/client_side_encryption.prose.test.ts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,9 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
15161516
const masterKeyInvalidHostname = { ...masterKey, endpoint: '127.0.0.1:9001' };
15171517

15181518
it('should fail with no TLS', metadata, async function () {
1519+
// NODE-6861: flakiness is caused by mock KMS servers
1520+
this.retries(2);
1521+
15191522
try {
15201523
await clientEncryptionNoTls.createDataKey('aws', { masterKey });
15211524
expect.fail('it must fail with no tls');
@@ -1568,15 +1571,18 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
15681571
keyName: 'foo'
15691572
};
15701573

1571-
it.skip('should fail with no TLS', metadata, async function () {
1574+
it('should fail with no TLS', metadata, async function () {
1575+
// NODE-6861: flakiness is caused by mock KMS servers
1576+
this.retries(2);
1577+
15721578
try {
15731579
await clientEncryptionNoTls.createDataKey('azure', { masterKey });
15741580
expect.fail('it must fail with no tls');
15751581
} catch (e) {
15761582
//Expect an error indicating TLS handshake failed.
15771583
expect(e.cause.message).to.include('certificate required');
15781584
}
1579-
}).skipReason = 'TODO(NODE-6861): fix flaky test';
1585+
});
15801586

15811587
it('should succeed with valid TLS options', metadata, async function () {
15821588
try {
@@ -1620,6 +1626,9 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
16201626
};
16211627

16221628
it('should fail with no TLS', metadata, async function () {
1629+
// NODE-6861: flakiness is caused by mock KMS servers
1630+
this.retries(2);
1631+
16231632
try {
16241633
await clientEncryptionNoTls.createDataKey('gcp', { masterKey });
16251634
expect.fail('it must fail with no tls');
@@ -1666,6 +1675,9 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
16661675
const masterKey = {};
16671676

16681677
it('should fail with no TLS', metadata, async function () {
1678+
// NODE-6861: flakiness is caused by mock KMS servers
1679+
this.retries(2);
1680+
16691681
const e = await clientEncryptionNoTls.createDataKey('kmip', { masterKey }).catch(e => e);
16701682
//Expect an error indicating TLS handshake failed.
16711683
expect(e.cause.message).to.match(/before secure TLS connection|handshake/);
@@ -1797,6 +1809,9 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
17971809
});
17981810
it('Named AWS', async function () {
17991811
{
1812+
// NODE-6861: flakiness is caused by mock KMS servers
1813+
this.retries(2);
1814+
18001815
// Call `client_encryption_with_names.createDataKey()` with "aws:no_client_cert" as the provider and the following masterKey.
18011816
const error = await clientEncryptionWithNames
18021817
.createDataKey('aws:no_client_cert', {
@@ -1832,6 +1847,9 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
18321847

18331848
it('Named Azure', async function () {
18341849
{
1850+
// NODE-6861: flakiness is caused by mock KMS servers
1851+
this.retries(2);
1852+
18351853
// Call `client_encryption_with_names.createDataKey()` with "aws:no_client_cert" as the provider and the following masterKey.
18361854
const error = await clientEncryptionWithNames
18371855
.createDataKey('azure:no_client_cert', {
@@ -1859,6 +1877,9 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
18591877

18601878
it('Named GCP', async function () {
18611879
{
1880+
// NODE-6861: flakiness is caused by mock KMS servers
1881+
this.retries(2);
1882+
18621883
// Call `client_encryption_with_names.createDataKey()` with "aws:no_client_cert" as the provider and the following masterKey.
18631884
const error = await clientEncryptionWithNames
18641885
.createDataKey('gcp:no_client_cert', {

0 commit comments

Comments
 (0)