Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the region_stats API will return an error in instance test #4935

Open
killme2008 opened this issue Nov 4, 2024 · 1 comment
Open

the region_stats API will return an error in instance test #4935

killme2008 opened this issue Nov 4, 2024 · 1 comment
Labels
good first issue Good for newcomers

Comments

@killme2008
Copy link
Contributor

          @WenyXu  Looks like the `region_stats` API will return an error in instance test 

async fn test_use_database(instance: Arc<dyn MockInstance>) {

The failure CI is https://github.com/GreptimeTeam/greptimedb/actions/runs/11657280986/job/32454614252?pr=4927

thread 'tests::instance_test::test_use_database::case_2_test_with_distributed' panicked at /Users/dennis/programming/rust/greptimedb/src/common/test-util/src/recordbatch.rs:26:75:
called `Result::unwrap()` on an `Err` value: 0: , at src/common/recordbatch/src/adapter.rs:291:55
1: External(External(0: , at src/common/recordbatch/src/adapter.rs:291:55
1: External(0: Failed to region stats in cluster, at src/cmd/src/lib.rs:172:14

So I have to use unwrap_or_else instead of ? operator here.

Originally posted by @killme2008 in #4927 (comment)

@WenyXu
Copy link
Member

WenyXu commented Nov 4, 2024

We can call enable_access_cluster_info in tests-integration/cluster's build_frontend method to fix it

    async fn build_frontend(
        &self,
        metasrv: MockInfo,
        datanode_clients: Arc<NodeClients>,
    ) -> Arc<FeInstance> {
        let mut meta_client = MetaClientBuilder::frontend_default_options(1000)
            .channel_manager(metasrv.channel_manager)
            .enable_access_cluster_info()
            .build();

@WenyXu WenyXu added the good first issue Good for newcomers label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants