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<()> {
718718 let _guard = LOCK . run_concurrently ( ) . await ;
719719
720720 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+ {
722724 log_uncaptured ( format ! (
723725 "skipping change stream test on unsupported version {:?}" ,
724726 client. server_version
Original file line number Diff line number Diff line change @@ -326,16 +326,21 @@ impl TestClient {
326326
327327 pub ( crate ) fn supports_fail_command ( & self ) -> bool {
328328 let version = if self . is_sharded ( ) {
329- VersionReq :: parse ( ">= 4.1.5" ) . unwrap ( )
329+ ">= 4.1.5"
330330 } else {
331- VersionReq :: parse ( ">= 4.0" ) . unwrap ( )
331+ ">= 4.0"
332332 } ;
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 )
334340 }
335341
336342 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" )
339344 }
340345
341346 /// Whether the deployment supports failing the initial handshake
You can’t perform that action at this time.
0 commit comments