@@ -232,26 +232,19 @@ public void testManyMutationsOnAuthorizedView() throws IOException, InterruptedE
232232 .first ()
233233 .call (Query .create (testEnvRule .env ().getTableId ()).rowKey (rowPrefix + "test-key" ));
234234 assertThat (row .getCells ()).hasSize (100002 );
235- }
236235
237- // We should not be able to mutate rows outside the authorized view
238- try {
239- try (BigtableDataClient client = BigtableDataClient .create (settings );
240- Batcher <RowMutationEntry , Void > batcherOutsideAuthorizedView =
241- client .newBulkMutationBatcher (
242- AuthorizedViewId .of (
243- testEnvRule .env ().getTableId ().getTableId (), testAuthorizedView .getId ()))) {
244- String keyOutsideAuthorizedView = UUID .randomUUID () + "-outside-authorized-view" ;
245- RowMutationEntry rowMutationEntry = RowMutationEntry .create (keyOutsideAuthorizedView );
246- rowMutationEntry .setCell (
247- testEnvRule .env ().getFamilyId (), AUTHORIZED_VIEW_COLUMN_QUALIFIER , "test-value" );
248- @ SuppressWarnings ("UnusedVariable" )
249- ApiFuture <Void > ignored = batcherOutsideAuthorizedView .add (rowMutationEntry );
250- batcherOutsideAuthorizedView .flush ();
236+ // We should not be able to mutate rows outside the authorized view
237+ String keyOutsideAuthorizedView = UUID .randomUUID () + "-outside-authorized-view" ;
238+ RowMutationEntry rowMutationEntry = RowMutationEntry .create (keyOutsideAuthorizedView );
239+ rowMutationEntry .setCell (
240+ testEnvRule .env ().getFamilyId (), AUTHORIZED_VIEW_COLUMN_QUALIFIER , "test-value" );
241+ try {
242+ ApiFuture <Void > ignored = batcher .add (rowMutationEntry );
243+ batcher .flush ();
244+ fail ("Should not be able to apply bulk mutation on rows outside authorized view" );
245+ } catch (Exception e ) {
246+ // ignore
251247 }
252- fail ("Should not be able to apply bulk mutation on rows outside authorized view" );
253- } catch (Exception e ) {
254- // Ignore.
255248 }
256249
257250 testEnvRule
0 commit comments