Skip to content

Commit

Permalink
chore: ignore PermissionDenied exceptions for tracing (#1780)
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite authored May 15, 2024
1 parent d26b3ac commit 166688d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import com.google.api.gax.rpc.PermissionDeniedException;
import com.google.api.gax.rpc.ResourceExhaustedException;
import com.google.auth.oauth2.GoogleCredentials;
import com.google.cloud.spanner.Database;
Expand Down Expand Up @@ -118,6 +119,8 @@ public void testSimpleSelect() throws Exception {
}
}
assertTrue(foundTrace);
} catch (PermissionDeniedException permissionDeniedException) {
// ignore, as the permissions to query Cloud Tracing is being removed automatically.
} catch (ResourceExhaustedException resourceExhaustedException) {
if (resourceExhaustedException
.getMessage()
Expand Down

0 comments on commit 166688d

Please sign in to comment.