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

Commit 67d1bf3

Browse files
committed
use tree set
1 parent 74c91a6 commit 67d1bf3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575
import com.google.protobuf.FieldMask;
7676
import io.grpc.Status;
7777
import io.grpc.Status.Code;
78-
import java.util.HashSet;
7978
import java.util.List;
8079
import java.util.Set;
80+
import java.util.TreeSet;
8181
import java.util.concurrent.atomic.AtomicBoolean;
8282
import java.util.concurrent.atomic.AtomicInteger;
8383
import org.junit.Before;
@@ -1215,7 +1215,9 @@ public void testCreateAppProfileAddRowAffinityAddSetOfClusterIds() {
12151215
// Setup
12161216
Mockito.when(mockStub.createAppProfileCallable()).thenReturn(mockCreateAppProfileCallable);
12171217

1218-
Set<String> clusterIds = new HashSet<String>();
1218+
// We want to make sure the expected request has the same ordering as the request we build
1219+
// from CreateAppProfileRequest. Use a TreeSet to for stable ordering.
1220+
Set<String> clusterIds = new TreeSet<>();
12191221
clusterIds.add("cluster-id-1");
12201222
clusterIds.add("cluster-id-2");
12211223

0 commit comments

Comments
 (0)