File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
test/integration/read-write-concern Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
13
13
OpMsgRequest
14
14
} from '../../mongodb' ;
15
15
import * as mock from '../../tools/mongodb-mock/index' ;
16
+ import { sleep } from '../../tools/utils' ;
16
17
import { filterForCommands } from '../shared' ;
17
18
18
19
describe ( 'Write Concern' , function ( ) {
@@ -98,6 +99,7 @@ describe('Write Concern', function () {
98
99
99
100
afterEach ( async function ( ) {
100
101
await db . dropDatabase ( ) ;
102
+ await sleep ( 1000 ) ;
101
103
await client . close ( ) ;
102
104
} ) ;
103
105
@@ -134,9 +136,10 @@ describe('Write Concern', function () {
134
136
await col . createIndex ( { b : - 1 } ) ;
135
137
await col . createIndex ( { a : 1 , b : - 1 } ) ;
136
138
139
+ await sleep ( 1000 ) ;
140
+
137
141
const listIndexesResult = col . listIndexes ( { batchSize : 2 } ) ;
138
142
const err = await listIndexesResult . toArray ( ) . catch ( e => e ) ;
139
-
140
143
expect ( err ) . to . not . be . instanceOf ( Error ) ;
141
144
} ) ;
142
145
@@ -165,6 +168,8 @@ describe('Write Concern', function () {
165
168
{ writeConcern : { w : 'majority' } }
166
169
) ;
167
170
171
+ await sleep ( 1000 ) ;
172
+
168
173
const err = await changes . next ( ) . catch ( e => e ) ;
169
174
expect ( err ) . to . not . be . instanceOf ( Error ) ;
170
175
}
You can’t perform that action at this time.
0 commit comments