Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit 67ef155

Browse files
authored
fix: change clusterId in Cmek test (#716)
* fix: change clusterId in Cmek test Change-Id: Idc8ad885205190374b089349ee94cc627bafd782 * refactor: add some logging Change-Id: I8d0ce18de5fa8e914344340850786930fbd670f1
1 parent dfc2efd commit 67ef155

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableCmekIT.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public class BigtableCmekIT {
7070
private static String instanceId;
7171
private static String clusterId1;
7272
private static String clusterId2;
73+
private static String clusterId3;
7374
private static String kmsKeyName;
7475
private static List<String> zones;
7576
private static String otherZone;
@@ -91,6 +92,7 @@ public static void validatePlatform() throws IOException {
9192
instanceId = AbstractTestEnv.TEST_INSTANCE_PREFIX + Instant.now().getEpochSecond();
9293
clusterId1 = instanceId + "-c1";
9394
clusterId2 = instanceId + "-c2";
95+
clusterId3 = instanceId + "-c3";
9496
zones = testEnvRule.env().getMultipleZonesInSameRegion();
9597
otherZone =
9698
Sets.difference(
@@ -110,6 +112,7 @@ public static void validatePlatform() throws IOException {
110112
.setInstanceId(instanceId)
111113
.build());
112114

115+
LOGGER.info("Creating cluster in zone: " + zones.get(0));
113116
instanceAdmin.createInstance(
114117
CreateInstanceRequest.of(instanceId)
115118
.addCmekCluster(clusterId1, zones.get(0), 1, StorageType.SSD, kmsKeyName));
@@ -137,6 +140,7 @@ public void instanceAndClusterTest() {
137140
Cluster cluster = instanceAdmin.getCluster(instanceId, clusterId1);
138141
assertThat(cluster.getKmsKeyName()).isEqualTo(kmsKeyName);
139142

143+
LOGGER.info("Creating cluster in zone: " + zones.get(1));
140144
instanceAdmin.createCluster(
141145
CreateClusterRequest.of(instanceId, clusterId2)
142146
.setZone(zones.get(1))
@@ -147,9 +151,10 @@ public void instanceAndClusterTest() {
147151
Cluster secondCluster = instanceAdmin.getCluster(instanceId, clusterId2);
148152
assertThat(secondCluster.getKmsKeyName()).isEqualTo(kmsKeyName);
149153

154+
LOGGER.info("Trying to create cluster in zone: " + otherZone);
150155
try {
151156
instanceAdmin.createCluster(
152-
CreateClusterRequest.of(instanceId, clusterId2)
157+
CreateClusterRequest.of(instanceId, clusterId3)
153158
.setZone(otherZone)
154159
.setServeNodes(1)
155160
.setStorageType(StorageType.SSD)

0 commit comments

Comments
 (0)