@@ -9,8 +9,6 @@ function makeConnectionString(config, username, password) {
9
9
10
10
const metadata : MongoDBMetadataUI = {
11
11
requires : {
12
- auth : 'enabled' ,
13
- mongodb : '>=3.7.3' ,
14
12
predicate : ( ) =>
15
13
process . env . LOAD_BALANCER ? 'TODO(NODE-5631): fix tests to run in load balancer mode.' : true
16
14
}
@@ -305,8 +303,7 @@ describe('Authentication Spec Prose Tests', function () {
305
303
) ;
306
304
} ) ;
307
305
308
- // TODO(NODE-6752): Fix flaky SCRAM-SHA-256 tests
309
- describe . skip ( 'Step 4' , function ( ) {
306
+ describe ( 'Step 4' , function ( ) {
310
307
/**
311
308
* Step 4
312
309
* To test SASLprep behavior, create two users:
@@ -343,11 +340,9 @@ describe('Authentication Spec Prose Tests', function () {
343
340
utilClient = this . configuration . newClient ( this . configuration . url ( ) ) ;
344
341
const db = utilClient . db ( 'admin' ) ;
345
342
346
- try {
347
- await Promise . all ( users . map ( user => db . removeUser ( user . username ) ) ) ;
348
- } catch {
349
- /** We ensure that users are deleted. No action needed. */
350
- }
343
+ // We do not care if this fails - this is just cleanup for any
344
+ // previous test iterations or previous test runs.
345
+ await Promise . allSettled ( users . map ( user => db . removeUser ( user . username ) ) ) ;
351
346
352
347
const createUserCommands = users . map ( user => ( {
353
348
createUser : user . username ,
@@ -356,7 +351,15 @@ describe('Authentication Spec Prose Tests', function () {
356
351
mechanisms : user . mechanisms
357
352
} ) ) ;
358
353
359
- await Promise . all ( createUserCommands . map ( cmd => db . command ( cmd ) ) ) ;
354
+ const failures = await Promise . allSettled (
355
+ createUserCommands . map ( cmd => db . command ( cmd ) )
356
+ ) . then ( resolutions => resolutions . filter ( resolution => resolution . status === 'rejected' ) ) ;
357
+
358
+ if ( failures . length ) {
359
+ throw new Error (
360
+ 'Error(s) creating users: ' + failures . map ( failure => failure . reason ) . join ( ' | ' )
361
+ ) ;
362
+ }
360
363
} ) ;
361
364
362
365
afterEach ( async function ( ) {
@@ -391,7 +394,7 @@ describe('Authentication Spec Prose Tests', function () {
391
394
const stats = await client . db ( 'admin' ) . stats ( ) ;
392
395
expect ( stats ) . to . exist ;
393
396
}
394
- ) . skipReason = 'TODO(NODE-6752): Fix flaky SCRAM-SHA-256 test' ;
397
+ ) ;
395
398
396
399
it (
397
400
'logs in with normalized username and non-normalized password' ,
0 commit comments