@@ -1432,9 +1432,6 @@ describe('encryption integration tests', () => {
1432
1432
} ) ;
1433
1433
1434
1434
describe ( 'QE encrypted queries' , function ( ) {
1435
- beforeEach ( function ( ) {
1436
- this . timeout ( 5_000 ) ;
1437
- } ) ;
1438
1435
describe ( 'when a field is configured for equality queries' , function ( ) {
1439
1436
it ( 'can be queried with mongoose' , async function ( ) {
1440
1437
connection = mongoose . createConnection ( ) ;
@@ -1443,6 +1440,7 @@ describe('encryption integration tests', () => {
1443
1440
} , { encryptionType : 'queryableEncryption' } ) ;
1444
1441
const model = connection . model ( new UUID ( ) . toHexString ( ) , schema ) ;
1445
1442
await connection . openUri ( clusterUri , autoEncryptionOptions ( ) ) ;
1443
+ await model . init ( ) ;
1446
1444
1447
1445
await model . insertMany ( [ { name : 'bailey' } , { name : 'john' } ] ) ;
1448
1446
@@ -1461,7 +1459,7 @@ describe('encryption integration tests', () => {
1461
1459
await connection . openUri ( clusterUri , autoEncryptionOptions ( ) ) ;
1462
1460
await model . init ( ) ;
1463
1461
1464
- await model . insertMany ( [ { name : { toString : function ( ) { 'asdf' ; } } } , { name : 'john' } ] ) ;
1462
+ await model . insertMany ( [ { name : 'bailey' } , { name : 'john' } ] ) ;
1465
1463
1466
1464
await assert . rejects ( ( ) => {
1467
1465
return model . findOne ( { name : 'bailey' } ) ;
0 commit comments