Skip to content

Create an integration test for CheckConsistency* functions. #1054

Closed

Description

@coryan

We need an integration test that creates a table (which may need to be replicated), then calls TableAdmin::GenerateConsistencyToken(), and later calls TableAdmin::CheckConsistency (and/or TableAdmin::WaitForConsistencyCheck) until the consistency is achieved.

Activity

  1. self-assigned this
    on Sep 8, 2018
  2. manish-qlogic commented on Sep 11, 2018

    @manish-qlogic
    Contributor

    @coryan

    We need an integration test that creates a table (which may need to be replicated)

    can we make assumption that instance passed as an argument to integration test uses replication (multiple clusters)?

  3. coryan commented on Sep 11, 2018

    @coryan
    ContributorAuthor

    Yes. Please check (using ListClusters()) at the beginning of the integration test, and printing a nice error message when the condition is not met.

  4. manish-qlogic commented on Sep 11, 2018

    @manish-qlogic
    Contributor

    Yes. Please check (using ListClusters()) at the beginning of the integration test, and printing a nice error message when the condition is not met.

    CheckConsistency is from TableAdmin where as ListClusters is part of InstanceAdmin, we haven't used both TableAdmin and InstanceAdmin in a single integration test till now. So should I create a bigtable_client_common_integration_test which would use both. This way CheckConsistency test case and even the SnapshotTable integration tests can be run against production without assuming existence of instances and clusters.

  5. coryan commented on Sep 12, 2018

    @coryan
    ContributorAuthor

    CheckConsistency is from TableAdmin where as ListClusters is part of InstanceAdmin, we haven't used both TableAdmin and InstanceAdmin in a single integration test till now.

    You are right, but it should be easy to just instantiate an InstanceAdmin just in that function?

  6. manish-qlogic commented on Sep 15, 2018

    @manish-qlogic
    Contributor

    @coryan

    a. CheckConsistency takes around 120 seconds against production, so created TableAdmin inside testcase with longer polling time.
    b. ListClusters() fails against emulator so created instance with 2 clusters within testcase.
    c. WaitForConsistencyCheck does not throw any error if polling period exhausts (link). This causes random failures(with no warning or error) as default polling period is 60 seconds and test case randomly takes more time (~120 seconds).

  7. added a commit that references this issue on Sep 19, 2018
    33e18ee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: bigtableIssues related to the Bigtable API.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions