Skip to content

Commit 3612c3d

Browse files
committed
test(bigtable): restore f.get() verification and suppress warnings
Restore assertThat(f.get()).isNull() assertions in EnhancedBigtableStubTest based on PR review feedback to explicitly document asynchronous future completion. Add @SuppressWarnings("NullArgumentForNonNullParameter") annotations to resolve Error Prone warnings triggered by Truth.assertThat() receiving an ApiFuture<Void> result. BUG=b/481669998 TAG=agy CONV=7b193e4d-38f8-450c-8475-0b9ae0d04507
1 parent e30aaf9 commit 3612c3d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

java-bigtable/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ public void testRMWRequestResponseConversion() throws ExecutionException, Interr
371371
}
372372

373373
@Test
374+
@SuppressWarnings("NullArgumentForNonNullParameter")
374375
public void testMutateRowRequestResponseConversion()
375376
throws ExecutionException, InterruptedException {
376377
RowMutation req = RowMutation.create(TableId.of("my-table"), "my-key").deleteRow();
@@ -385,9 +386,11 @@ public void testMutateRowRequestResponseConversion()
385386
MutateRowRequest protoReq = fakeDataService.mutateRowRequests.poll(1, TimeUnit.SECONDS);
386387
assertThat(protoReq)
387388
.isEqualTo(req.toProto(RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID)));
389+
assertThat(f.get()).isNull();
388390
}
389391

390392
@Test
393+
@SuppressWarnings("NullArgumentForNonNullParameter")
391394
public void testMutateRowRequestParams() throws ExecutionException, InterruptedException {
392395
RowMutation req = RowMutation.create(TABLE_ID, "my-key").deleteRow();
393396

@@ -405,6 +408,8 @@ public void testMutateRowRequestParams() throws ExecutionException, InterruptedE
405408

406409
// StatsHeadersUnaryCallable
407410
assertThat(reqMetadata.keys()).contains("bigtable-client-attempt-epoch-usec");
411+
412+
assertThat(f.get()).isNull();
408413
}
409414

410415
@Test

0 commit comments

Comments
 (0)