Fix: refactor unit test
@@ -53,9 +53,7 @@ async fn test_watch_main(
let _h = tokio::spawn(upsert_kv_client_main(addr.clone(), updates));
loop {
- tokio::select! {
- resp = client_stream.message() => {
- if let Ok(Some(resp)) = resp {
+ if let Ok(Some(resp)) = client_stream.message().await {
if let Some(event) = resp.event {
assert!(!watch_events.is_empty());
@@ -66,9 +64,6 @@ async fn test_watch_main(
break;
}
}
-
- }
- },
}
}
