File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -718,7 +718,9 @@ async fn split_large_event() -> Result<()> {
718
718
let _guard = LOCK . run_concurrently ( ) . await ;
719
719
720
720
let client = Client :: test_builder ( ) . build ( ) . await ;
721
- if !client. server_version_gte ( 7 , 0 ) {
721
+ if !( client. server_version_matches ( ">= 6.0.9, < 6.1" )
722
+ || client. server_version_matches ( ">= 7.0" ) )
723
+ {
722
724
log_uncaptured ( format ! (
723
725
"skipping change stream test on unsupported version {:?}" ,
724
726
client. server_version
Original file line number Diff line number Diff line change @@ -326,16 +326,21 @@ impl TestClient {
326
326
327
327
pub ( crate ) fn supports_fail_command ( & self ) -> bool {
328
328
let version = if self . is_sharded ( ) {
329
- VersionReq :: parse ( ">= 4.1.5" ) . unwrap ( )
329
+ ">= 4.1.5"
330
330
} else {
331
- VersionReq :: parse ( ">= 4.0" ) . unwrap ( )
331
+ ">= 4.0"
332
332
} ;
333
- version. matches ( & self . server_version )
333
+ self . server_version_matches ( version)
334
+ }
335
+
336
+ pub ( crate ) fn server_version_matches ( & self , req : & str ) -> bool {
337
+ VersionReq :: parse ( req)
338
+ . unwrap ( )
339
+ . matches ( & self . server_version )
334
340
}
335
341
336
342
pub ( crate ) fn supports_block_connection ( & self ) -> bool {
337
- let version = VersionReq :: parse ( ">= 4.2.9" ) . unwrap ( ) ;
338
- version. matches ( & self . server_version )
343
+ self . server_version_matches ( ">= 4.2.9" )
339
344
}
340
345
341
346
/// Whether the deployment supports failing the initial handshake
You can’t perform that action at this time.
0 commit comments