@@ -145,19 +145,22 @@ describe('Connection', function () {
145
145
}
146
146
} ) ;
147
147
148
- it ( 'supports fire-and-forget messages' , async function ( ) {
149
- const options : ConnectionOptions = {
150
- ...commonConnectOptions ,
151
- connectionType : Connection ,
152
- ...this . configuration . options ,
153
- metadata : makeClientMetadata ( { driverInfo : { } } ) ,
154
- extendedMetadata : addContainerMetadata ( makeClientMetadata ( { driverInfo : { } } ) )
155
- } ;
156
-
157
- const conn = await connect ( options ) ;
158
- const readSpy = sinon . spy ( conn , 'readMany' ) ;
159
- await conn . command ( ns ( '$admin.cmd' ) , { ping : 1 } , { moreToCome : true } ) ;
160
- expect ( readSpy ) . to . not . have . been . called ;
148
+ it ( 'supports fire-and-forget messages' , {
149
+ metadata : { requires : { apiVersion : false , topology : '!load-balanced' } } ,
150
+ test : async function ( ) {
151
+ const options : ConnectionOptions = {
152
+ ...commonConnectOptions ,
153
+ connectionType : Connection ,
154
+ ...this . configuration . options ,
155
+ metadata : makeClientMetadata ( { driverInfo : { } } ) ,
156
+ extendedMetadata : addContainerMetadata ( makeClientMetadata ( { driverInfo : { } } ) )
157
+ } ;
158
+
159
+ const conn = await connect ( options ) ;
160
+ const readSpy = sinon . spy ( conn , 'readMany' ) ;
161
+ await conn . command ( ns ( '$admin.cmd' ) , { ping : 1 } , { moreToCome : true } ) ;
162
+ expect ( readSpy ) . to . not . have . been . called ;
163
+ }
161
164
} ) ;
162
165
} ) ;
163
166
0 commit comments