-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Bigtable: Adding Integration Test of BigtableInstanceAdminClient #6186
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
Conversation
...table/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java
Show resolved
Hide resolved
...table/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java
Show resolved
Hide resolved
...table/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java
Outdated
Show resolved
Hide resolved
...table/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java
Outdated
Show resolved
Hide resolved
...table/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java
Outdated
Show resolved
Hide resolved
...table/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java
Outdated
Show resolved
Hide resolved
...table/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java
Outdated
Show resolved
Hide resolved
...table/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #6186 +/- ##
=========================================
Coverage 47.51% 47.51%
- Complexity 27460 27475 +15
=========================================
Files 2526 2526
Lines 274681 274681
Branches 31402 31397 -5
=========================================
Hits 130521 130521
Misses 134528 134528
Partials 9632 9632Continue to review full report at Codecov.
|
...table/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java
Outdated
Show resolved
Hide resolved
...table/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java
Show resolved
Hide resolved
...table/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java
Outdated
Show resolved
Hide resolved
| .addCluster(newClusterId, "us-central1-a", 1, StorageType.SSD) | ||
| .setDisplayName("Fresh-Instance-Name") | ||
| .addLabel("state", "readytodelete") | ||
| .setType(Instance.Type.PRODUCTION)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use a development instance. Also, prod instances require at least 3 nodes, while your cluster only has 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you should move this out of the try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My apologies for the number of nodes. I have switched to Development cluster:
client.createInstance(
CreateInstanceRequest.of(newInstanceId)
.addCluster(newClusterId, "us-central1-a", 0, StorageType.SSD)
.setDisplayName("Fresh-Instance-Name")
.addLabel("state", "readytodelete")
.setType(Instance.Type.DEVELOPMENT));Q: This was confusing to me, whenever I used 1 for the server nodes it threw an IllegalArgumentException stating server nodes cannot be provided.
com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Error in field 'clusters' : Serve nodes cannot be specified for development instances.This worked fine when the server node is 0(It creates an instance with a cluster combining of 0 nodes). Should we change this behavior or should we update the docs?
...table/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java
Outdated
Show resolved
Hide resolved
...table/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java
Outdated
Show resolved
Hide resolved
- Test case for AppProfile, IAMPolicy, Instance, Clusters. - BigtableInstanceAdminClient in AbstractTestEnv. - Added cleanups for stale appProfile/instance/cluster. - Setup a cleanUpInstance() in case of prod or direct_path env type.
5866706 to
46c64c0
Compare
...gle-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/TestEnvRule.java
Outdated
Show resolved
Hide resolved
igorbernstein2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks!
This PR contains Integration tests for BigtableInstanceAdminClient.
createBigtableResourceproperty is set along with other TestEnvRule properties.