@@ -743,6 +743,16 @@ describe('Shell API (integration)', function () {
743743
744744 describe ( '#reIndex' , function ( ) {
745745 skipIfApiStrict ( ) ;
746+ let unsubscribeAllowWarning : undefined | ( ( ) => void ) ;
747+
748+ before ( function ( ) {
749+ // Allow "The reIndex command is deprecated" warnings
750+ unsubscribeAllowWarning = testServer . allowWarning ?.( 6508600 ) ;
751+ } ) ;
752+
753+ after ( function ( ) {
754+ unsubscribeAllowWarning ?.( ) ;
755+ } ) ;
746756
747757 beforeEach ( async function ( ) {
748758 await serviceProvider . createCollection ( dbName , collectionName ) ;
@@ -1069,6 +1079,16 @@ describe('Shell API (integration)', function () {
10691079
10701080 describe ( 'runCommand' , function ( ) {
10711081 skipIfApiStrict ( ) ;
1082+ let unsubscribeAllowWarning : undefined | ( ( ) => void ) ;
1083+
1084+ before ( function ( ) {
1085+ // Allow "The collStats command is deprecated" warnings
1086+ unsubscribeAllowWarning = testServer . allowWarning ?.( 7024600 ) ;
1087+ } ) ;
1088+
1089+ after ( function ( ) {
1090+ unsubscribeAllowWarning ?.( ) ;
1091+ } ) ;
10721092
10731093 beforeEach ( async function ( ) {
10741094 await serviceProvider . createCollection ( dbName , collectionName ) ;
@@ -1353,6 +1373,21 @@ describe('Shell API (integration)', function () {
13531373 // https://jira.mongodb.org/browse/SERVER-58076
13541374 skipIfServerVersion ( testServer , '<= 6.0' ) ;
13551375 }
1376+ let unsubscribeAllowWarning : undefined | ( ( ) => void ) ;
1377+
1378+ before ( function ( ) {
1379+ // Allow warning for the failing updateOne() below
1380+ unsubscribeAllowWarning = testServer . allowWarning ?.(
1381+ ( entry ) =>
1382+ entry . id === 7267501 &&
1383+ entry . attr ?. error ?. codeName === 'DollarPrefixedFieldName'
1384+ ) ;
1385+ } ) ;
1386+
1387+ after ( function ( ) {
1388+ unsubscribeAllowWarning ?.( ) ;
1389+ } ) ;
1390+
13561391 it ( 'can insert, modify and retrieve fields with $-prefixed .-containing names' , async function ( ) {
13571392 await collection . insertOne ( { '$x.y' : 1 , _id : '_id' } ) ;
13581393 expect ( await collection . findOne ( ) ) . to . deep . equal ( {
@@ -1991,6 +2026,16 @@ describe('Shell API (integration)', function () {
19912026
19922027 describe ( 'mapReduce' , function ( ) {
19932028 skipIfServerVersion ( testServer , '< 4.4' ) ;
2029+ let unsubscribeAllowWarning : undefined | ( ( ) => void ) ;
2030+
2031+ before ( function ( ) {
2032+ // Allow "The map reduce command is deprecated" warning
2033+ unsubscribeAllowWarning = testServer . allowWarning ?.( 5725801 ) ;
2034+ } ) ;
2035+
2036+ after ( function ( ) {
2037+ unsubscribeAllowWarning ?.( ) ;
2038+ } ) ;
19942039
19952040 let mapFn : ( ) => void ;
19962041 let reduceFn : ( a : string , b : string [ ] ) => string ;
@@ -3007,6 +3052,21 @@ describe('Shell API (integration)', function () {
30073052
30083053 describe ( 'maxTimeMS support' , function ( ) {
30093054 skipIfServerVersion ( testServer , '< 4.2' ) ;
3055+ let unsubscribeAllowWarning : undefined | ( ( ) => void ) ;
3056+
3057+ before ( function ( ) {
3058+ // Allow "$where is deprecated" warning and timeout warnings
3059+ unsubscribeAllowWarning = testServer . allowWarning ?.(
3060+ ( entry ) =>
3061+ entry . id === 8996500 ||
3062+ ( entry . id === 23798 &&
3063+ entry . attr ?. error ?. codeName === 'MaxTimeMSExpired' )
3064+ ) ;
3065+ } ) ;
3066+
3067+ after ( function ( ) {
3068+ unsubscribeAllowWarning ?.( ) ;
3069+ } ) ;
30103070
30113071 beforeEach ( async function ( ) {
30123072 await collection . insertMany ( [ ...Array ( 10 ) . keys ( ) ] . map ( ( i ) => ( { i } ) ) ) ;
0 commit comments