fix: add delays in reconcile tests for async cache invalidation (#7147)

Signed-off-by: WenyXu <wenymedia@gmail.com>
This commit is contained in:
Weny Xu
2025-10-27 16:07:51 +08:00
committed by GitHub
parent a20ac4f9e5
commit 785f9d7fd7
2 changed files with 11 additions and 0 deletions

View File

@@ -104,6 +104,9 @@ impl HeartbeatTask {
match resp_stream.message().await {
Ok(Some(resp)) => {
debug!("Receiving heartbeat response: {:?}", resp);
if let Some(message) = &resp.mailbox_message {
info!("Received mailbox message: {message:?}");
}
let ctx = HeartbeatResponseHandlerContext::new(mailbox.clone(), resp);
if let Err(e) = capture_self.handle_response(ctx).await {
error!(e; "Error while handling heartbeat response");

View File

@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use std::time::Duration;
use client::{DEFAULT_CATALOG_NAME, DEFAULT_SCHEMA_NAME, OutputData};
use common_meta::reconciliation::ResolveStrategy;
use common_meta::reconciliation::manager::ReconciliationManagerRef;
@@ -165,6 +167,8 @@ async fn test_reconcile_dropped_column() {
"grpc_latencies",
)
.await;
// Try best effort to wait for the cache to be invalidated.
tokio::time::sleep(Duration::from_secs(1)).await;
// Now we should able to query table again.
let output = execute_sql(&frontend, "SELECT * FROM grpc_latencies ORDER BY host").await;
@@ -268,6 +272,8 @@ async fn test_reconcile_added_column() {
"grpc_latencies",
)
.await;
// Try best effort to wait for the cache to be invalidated.
tokio::time::sleep(Duration::from_secs(1)).await;
// Now the column cloud_provider is available.
let output = execute_sql(&frontend, "SELECT * FROM grpc_latencies ORDER BY host").await;
@@ -342,6 +348,8 @@ async fn test_reconcile_modify_column_type() {
"grpc_latencies",
)
.await;
// Try best effort to wait for the cache to be invalidated.
tokio::time::sleep(Duration::from_secs(1)).await;
// Now we can query the table again.
let output = execute_sql(&frontend, "SELECT * FROM grpc_latencies ORDER BY host").await;