From bc1d5ef5931998ee6fde0c4ffb5271b453598de3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Olav=20L=C3=B8ite?= Date: Wed, 15 May 2024 09:14:03 +0200 Subject: [PATCH] chore: ignore PermissionDenied exceptions for tracing --- .../google/cloud/spanner/pgadapter/ITOpenTelemetryTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/com/google/cloud/spanner/pgadapter/ITOpenTelemetryTest.java b/src/test/java/com/google/cloud/spanner/pgadapter/ITOpenTelemetryTest.java index ede12afc9..46d1c6300 100644 --- a/src/test/java/com/google/cloud/spanner/pgadapter/ITOpenTelemetryTest.java +++ b/src/test/java/com/google/cloud/spanner/pgadapter/ITOpenTelemetryTest.java @@ -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; @@ -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()