You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create an integration test for CheckConsistency* functions. #1054
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.
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.
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?
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).
Activity
manish-qlogic commentedon Sep 11, 2018
@coryan
can we make assumption that instance passed as an argument to integration test uses replication (multiple clusters)?
coryan commentedon Sep 11, 2018
Yes. Please check (using
ListClusters()) at the beginning of the integration test, and printing a nice error message when the condition is not met.manish-qlogic commentedon Sep 11, 2018
CheckConsistencyis fromTableAdminwhere asListClustersis part ofInstanceAdmin, we haven't used bothTableAdminandInstanceAdminin a single integration test till now. So should I create a bigtable_client_common_integration_test which would use both. This wayCheckConsistencytest case and even theSnapshotTableintegration tests can be run against production without assuming existence of instances and clusters.coryan commentedon Sep 12, 2018
You are right, but it should be easy to just instantiate an
InstanceAdminjust in that function?manish-qlogic commentedon Sep 15, 2018
@coryan
a.
CheckConsistencytakes around 120 seconds against production, so createdTableAdmininside testcase with longer polling time.b.
ListClusters()fails against emulator so created instance with 2 clusters within testcase.c.
WaitForConsistencyCheckdoes 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).Integration test for CheckConsistency (#1139)