mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-20 23:10:37 +00:00
feat: grpc client support multi peers (#380)
* feat: grpc client use channel manager * cr
This commit is contained in:
@@ -45,7 +45,7 @@ async fn setup_grpc_server(name: &str, port: usize) -> (String, TestGuard, Arc<G
|
||||
async fn test_auto_create_table() {
|
||||
let (addr, _guard, grpc_server) = setup_grpc_server("auto_create_table", 3991).await;
|
||||
|
||||
let grpc_client = Client::connect(format!("http://{}", addr)).await.unwrap();
|
||||
let grpc_client = Client::with_urls(vec![addr]);
|
||||
let db = Database::new("greptime", grpc_client);
|
||||
|
||||
insert_and_assert(&db).await;
|
||||
@@ -111,7 +111,7 @@ fn expect_data() -> (Column, Column, Column, Column) {
|
||||
async fn test_insert_and_select() {
|
||||
let (addr, _guard, grpc_server) = setup_grpc_server("insert_and_select", 3990).await;
|
||||
|
||||
let grpc_client = Client::connect(format!("http://{}", addr)).await.unwrap();
|
||||
let grpc_client = Client::with_urls(vec![addr]);
|
||||
|
||||
let db = Database::new("greptime", grpc_client.clone());
|
||||
let admin = Admin::new("greptime", grpc_client);
|
||||
|
||||
Reference in New Issue
Block a user