From c6f6a7858491d00771b717c15bc41ada6ea53edd Mon Sep 17 00:00:00 2001 From: Derek Yau Date: Fri, 11 Oct 2024 14:02:30 -0400 Subject: [PATCH] Remove extra test for cluster IDs - one is enough Change-Id: I6d8e7bd644ce2cd8f098c8ee37b4eec1a0d642e2 --- .../v2/BigtableInstanceAdminClientTests.java | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTests.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTests.java index 2dd90f461a..724f75bc98 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTests.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTests.java @@ -1129,54 +1129,6 @@ public void testCreateAppProfileAddRowAffinityAddMultipleClusterIds() { assertThat(actualResult).isEqualTo(AppProfile.fromProto(expectedResponse)); } - @Test - public void testCreateAppProfileAddRowAffinityAddMultipleClusterIdsWithList() { - // Setup - Mockito.when(mockStub.createAppProfileCallable()).thenReturn(mockCreateAppProfileCallable); - - com.google.bigtable.admin.v2.CreateAppProfileRequest expectedRequest = - com.google.bigtable.admin.v2.CreateAppProfileRequest.newBuilder() - .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) - .setAppProfileId(APP_PROFILE_ID) - .setAppProfile( - com.google.bigtable.admin.v2.AppProfile.newBuilder() - .setDescription("my description") - .setMultiClusterRoutingUseAny( - com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny - .newBuilder() - .addAllClusterIds(ImmutableList.of("cluster-id-1", "cluster-id-2")) - .setRowAffinity( - com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny - .RowAffinity.getDefaultInstance()))) - .build(); - - com.google.bigtable.admin.v2.AppProfile expectedResponse = - com.google.bigtable.admin.v2.AppProfile.newBuilder() - .setName(APP_PROFILE_NAME) - .setDescription("my description") - .setMultiClusterRoutingUseAny( - com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.newBuilder() - .addAllClusterIds(ImmutableList.of("cluster-id-1", "cluster-id-2")) - .setRowAffinity( - com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny - .RowAffinity.getDefaultInstance())) - .build(); - - Mockito.when(mockCreateAppProfileCallable.futureCall(expectedRequest)) - .thenReturn(ApiFutures.immediateFuture(expectedResponse)); - - // Execute - AppProfile actualResult = - adminClient.createAppProfile( - CreateAppProfileRequest.of(INSTANCE_ID, APP_PROFILE_ID) - .setDescription("my description") - .setRoutingPolicy( - MultiClusterRoutingPolicy.withRowAffinity("cluster-id-1", "cluster-id-2"))); - - // Verify - assertThat(actualResult).isEqualTo(AppProfile.fromProto(expectedResponse)); - } - @Test public void testGetAppProfile() { // Setup