@@ -24,7 +24,7 @@ import {
24
24
} from '../../mongodb' ;
25
25
import * as mock from '../../tools/mongodb-mock/index' ;
26
26
import { TestBuilder , UnifiedTestSuiteBuilder } from '../../tools/unified_suite_builder' ;
27
- import { type FailPoint , sleep } from '../../tools/utils' ;
27
+ import { type FailCommandFailPoint , sleep } from '../../tools/utils' ;
28
28
import { delay , filterForCommands } from '../shared' ;
29
29
30
30
const initIteratorMode = async ( cs : ChangeStream ) => {
@@ -1097,7 +1097,7 @@ describe('Change Streams', function () {
1097
1097
failCommands : [ 'getMore' ] ,
1098
1098
errorCode : unresumableErrorCode
1099
1099
}
1100
- } as FailPoint ) ;
1100
+ } as FailCommandFailPoint ) ;
1101
1101
1102
1102
await collection . insertOne ( { city : 'New York City' } ) ;
1103
1103
try {
@@ -1912,7 +1912,7 @@ describe('ChangeStream resumability', function () {
1912
1912
errorCode : code ,
1913
1913
errmsg : message
1914
1914
}
1915
- } as FailPoint ) ;
1915
+ } as FailCommandFailPoint ) ;
1916
1916
1917
1917
await collection . insertOne ( { name : 'bailey' } ) ;
1918
1918
@@ -1940,7 +1940,7 @@ describe('ChangeStream resumability', function () {
1940
1940
errorCode : code ,
1941
1941
errmsg : message
1942
1942
}
1943
- } as FailPoint ) ;
1943
+ } as FailCommandFailPoint ) ;
1944
1944
1945
1945
// There's an inherent race condition here because we need to make sure that the `aggregates` that succeed when
1946
1946
// resuming a change stream don't return the change event. So we defer the insert until a period of time
@@ -1979,7 +1979,7 @@ describe('ChangeStream resumability', function () {
1979
1979
errorCode : resumableErrorCodes [ 0 ] . code ,
1980
1980
errmsg : resumableErrorCodes [ 0 ] . message
1981
1981
}
1982
- } as FailPoint ) ;
1982
+ } as FailCommandFailPoint ) ;
1983
1983
1984
1984
expect ( changeStream . cursor )
1985
1985
. to . have . property ( 'changeStreamCursorOptions' )
@@ -2009,7 +2009,7 @@ describe('ChangeStream resumability', function () {
2009
2009
failCommands : [ 'getMore' ] ,
2010
2010
errorCode : unresumableErrorCode
2011
2011
}
2012
- } as FailPoint ) ;
2012
+ } as FailCommandFailPoint ) ;
2013
2013
2014
2014
await initIteratorMode ( changeStream ) ;
2015
2015
@@ -2032,7 +2032,7 @@ describe('ChangeStream resumability', function () {
2032
2032
failCommands : [ 'aggregate' ] ,
2033
2033
errorCode : resumableErrorCode
2034
2034
}
2035
- } as FailPoint ) ;
2035
+ } as FailCommandFailPoint ) ;
2036
2036
2037
2037
changeStream = collection . watch ( [ ] ) ;
2038
2038
@@ -2066,7 +2066,7 @@ describe('ChangeStream resumability', function () {
2066
2066
errorCode : code ,
2067
2067
errmsg : message
2068
2068
}
2069
- } as FailPoint ) ;
2069
+ } as FailCommandFailPoint ) ;
2070
2070
2071
2071
await collection . insertOne ( { name : 'bailey' } ) ;
2072
2072
@@ -2094,7 +2094,7 @@ describe('ChangeStream resumability', function () {
2094
2094
errorCode : code ,
2095
2095
errmsg : message
2096
2096
}
2097
- } as FailPoint ) ;
2097
+ } as FailCommandFailPoint ) ;
2098
2098
2099
2099
// There's an inherent race condition here because we need to make sure that the `aggregates` that succeed when
2100
2100
// resuming a change stream don't return the change event. So we defer the insert until a period of time
@@ -2133,7 +2133,7 @@ describe('ChangeStream resumability', function () {
2133
2133
errorCode : resumableErrorCodes [ 0 ] . code ,
2134
2134
errmsg : resumableErrorCodes [ 0 ] . message
2135
2135
}
2136
- } as FailPoint ) ;
2136
+ } as FailCommandFailPoint ) ;
2137
2137
2138
2138
expect ( changeStream . cursor )
2139
2139
. to . have . property ( 'changeStreamCursorOptions' )
@@ -2163,7 +2163,7 @@ describe('ChangeStream resumability', function () {
2163
2163
failCommands : [ 'getMore' ] ,
2164
2164
errorCode : unresumableErrorCode
2165
2165
}
2166
- } as FailPoint ) ;
2166
+ } as FailCommandFailPoint ) ;
2167
2167
2168
2168
await initIteratorMode ( changeStream ) ;
2169
2169
@@ -2186,7 +2186,7 @@ describe('ChangeStream resumability', function () {
2186
2186
failCommands : [ 'aggregate' ] ,
2187
2187
errorCode : resumableErrorCode
2188
2188
}
2189
- } as FailPoint ) ;
2189
+ } as FailCommandFailPoint ) ;
2190
2190
2191
2191
changeStream = collection . watch ( [ ] ) ;
2192
2192
@@ -2220,7 +2220,7 @@ describe('ChangeStream resumability', function () {
2220
2220
errorCode : code ,
2221
2221
errmsg : message
2222
2222
}
2223
- } as FailPoint ) ;
2223
+ } as FailCommandFailPoint ) ;
2224
2224
2225
2225
try {
2226
2226
// tryNext is not blocking and on sharded clusters we don't have control of when
@@ -2255,7 +2255,7 @@ describe('ChangeStream resumability', function () {
2255
2255
errorCode : code ,
2256
2256
errmsg : message
2257
2257
}
2258
- } as FailPoint ) ;
2258
+ } as FailCommandFailPoint ) ;
2259
2259
2260
2260
try {
2261
2261
// tryNext is not blocking and on sharded clusters we don't have control of when
@@ -2294,7 +2294,7 @@ describe('ChangeStream resumability', function () {
2294
2294
errorCode : resumableErrorCodes [ 0 ] . code ,
2295
2295
errmsg : resumableErrorCodes [ 0 ] . message
2296
2296
}
2297
- } as FailPoint ) ;
2297
+ } as FailCommandFailPoint ) ;
2298
2298
2299
2299
expect ( changeStream . cursor )
2300
2300
. to . have . property ( 'changeStreamCursorOptions' )
@@ -2324,7 +2324,7 @@ describe('ChangeStream resumability', function () {
2324
2324
failCommands : [ 'getMore' ] ,
2325
2325
errorCode : unresumableErrorCode
2326
2326
}
2327
- } as FailPoint ) ;
2327
+ } as FailCommandFailPoint ) ;
2328
2328
2329
2329
await initIteratorMode ( changeStream ) ;
2330
2330
@@ -2345,7 +2345,7 @@ describe('ChangeStream resumability', function () {
2345
2345
failCommands : [ 'aggregate' ] ,
2346
2346
errorCode : resumableErrorCode
2347
2347
}
2348
- } as FailPoint ) ;
2348
+ } as FailCommandFailPoint ) ;
2349
2349
2350
2350
changeStream = collection . watch ( [ ] ) ;
2351
2351
@@ -2382,7 +2382,7 @@ describe('ChangeStream resumability', function () {
2382
2382
errorCode : code ,
2383
2383
errmsg : message
2384
2384
}
2385
- } as FailPoint ) ;
2385
+ } as FailCommandFailPoint ) ;
2386
2386
2387
2387
for await ( const change of changeStream ) {
2388
2388
const { fullDocument } = change ;
@@ -2417,7 +2417,7 @@ describe('ChangeStream resumability', function () {
2417
2417
errorCode : resumableErrorCodes [ 0 ] . code ,
2418
2418
errmsg : resumableErrorCodes [ 0 ] . message
2419
2419
}
2420
- } as FailPoint ) ;
2420
+ } as FailCommandFailPoint ) ;
2421
2421
2422
2422
expect ( changeStream . cursor )
2423
2423
. to . have . property ( 'changeStreamCursorOptions' )
@@ -2450,7 +2450,7 @@ describe('ChangeStream resumability', function () {
2450
2450
failCommands : [ 'getMore' ] ,
2451
2451
errorCode : unresumableErrorCode
2452
2452
}
2453
- } as FailPoint ) ;
2453
+ } as FailCommandFailPoint ) ;
2454
2454
2455
2455
try {
2456
2456
// eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -2479,7 +2479,7 @@ describe('ChangeStream resumability', function () {
2479
2479
failCommands : [ 'aggregate' ] ,
2480
2480
errorCode : resumableErrorCode
2481
2481
}
2482
- } as FailPoint ) ;
2482
+ } as FailCommandFailPoint ) ;
2483
2483
2484
2484
try {
2485
2485
// eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -2515,7 +2515,7 @@ describe('ChangeStream resumability', function () {
2515
2515
errorCode : code ,
2516
2516
errmsg : message
2517
2517
}
2518
- } as FailPoint ) ;
2518
+ } as FailCommandFailPoint ) ;
2519
2519
2520
2520
const changes = once ( changeStream , 'change' ) ;
2521
2521
await once ( changeStream . cursor , 'init' ) ;
@@ -2545,7 +2545,7 @@ describe('ChangeStream resumability', function () {
2545
2545
errorCode : code ,
2546
2546
errmsg : message
2547
2547
}
2548
- } as FailPoint ) ;
2548
+ } as FailCommandFailPoint ) ;
2549
2549
2550
2550
const changes = once ( changeStream , 'change' ) ;
2551
2551
await once ( changeStream . cursor , 'init' ) ;
@@ -2585,7 +2585,7 @@ describe('ChangeStream resumability', function () {
2585
2585
errorCode : resumableErrorCodes [ 0 ] . code ,
2586
2586
errmsg : resumableErrorCodes [ 0 ] . message
2587
2587
}
2588
- } as FailPoint ) ;
2588
+ } as FailCommandFailPoint ) ;
2589
2589
2590
2590
expect ( changeStream . cursor )
2591
2591
. to . have . property ( 'changeStreamCursorOptions' )
@@ -2618,7 +2618,7 @@ describe('ChangeStream resumability', function () {
2618
2618
failCommands : [ 'getMore' ] ,
2619
2619
errorCode : unresumableErrorCode
2620
2620
}
2621
- } as FailPoint ) ;
2621
+ } as FailCommandFailPoint ) ;
2622
2622
2623
2623
const willBeError = once ( changeStream , 'change' ) . catch ( error => error ) ;
2624
2624
await once ( changeStream . cursor , 'init' ) ;
@@ -2646,7 +2646,7 @@ describe('ChangeStream resumability', function () {
2646
2646
errorCode : unresumableErrorCode ,
2647
2647
errmsg : 'operation was interrupted'
2648
2648
}
2649
- } as FailPoint ) ;
2649
+ } as FailCommandFailPoint ) ;
2650
2650
2651
2651
const willBeError = once ( changeStream , 'change' ) . catch ( error => error ) ;
2652
2652
await once ( changeStream . cursor , 'init' ) ;
@@ -2671,7 +2671,7 @@ describe('ChangeStream resumability', function () {
2671
2671
failCommands : [ 'aggregate' ] ,
2672
2672
errorCode : resumableErrorCode
2673
2673
}
2674
- } as FailPoint ) ;
2674
+ } as FailCommandFailPoint ) ;
2675
2675
2676
2676
const willBeError = once ( changeStream , 'change' ) . catch ( error => error ) ;
2677
2677
await collection . insertOne ( { name : 'bailey' } ) ;
0 commit comments