Skip to content

Commit 56d6b1f

Browse files
committed
chore(meta/test): fake server responds with a valid protocol version
1 parent 635e598 commit 56d6b1f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/meta/client/tests/it/grpc_server.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ use std::thread::sleep;
1717
use std::time::Duration;
1818

1919
use common_base::base::tokio;
20+
use common_meta_client::to_digit_ver;
21+
use common_meta_client::MIN_METASRV_SEMVER;
2022
use common_meta_types::protobuf::meta_service_server::MetaService;
2123
use common_meta_types::protobuf::meta_service_server::MetaServiceServer;
2224
use common_meta_types::protobuf::ClientInfo;
@@ -51,7 +53,12 @@ impl MetaService for GrpcServiceForTestImpl {
5153
_request: Request<Streaming<common_meta_types::protobuf::HandshakeRequest>>,
5254
) -> Result<Response<Self::HandshakeStream>, Status> {
5355
tokio::time::sleep(Duration::from_secs(2)).await;
54-
let output = futures::stream::once(async { Ok(HandshakeResponse::default()) });
56+
let output = futures::stream::once(async {
57+
Ok(HandshakeResponse {
58+
protocol_version: to_digit_ver(&MIN_METASRV_SEMVER),
59+
payload: vec![],
60+
})
61+
});
5562
Ok(Response::new(Box::pin(output)))
5663
}
5764

0 commit comments

Comments
 (0)