Skip to content

Commit 616b34a

Browse files
committed
chore: disable afe latency metric test
1 parent 29c5d7f commit 616b34a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBuiltInMetricsTest.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,18 @@ public void testBuiltinMetricsWithDefaultOTEL() throws Exception {
126126
response = metricClient.listTimeSeriesCallable().call(request);
127127
}
128128

129-
assertWithMessage("Metric " + metric + " didn't return any data.")
130-
.that(response.getTimeSeriesCount())
131-
.isGreaterThan(0);
129+
// afe_latencies metric currently does not return data as afe server-timing header is
130+
// disabled.
131+
// Keeping this check to enable this check in the future.
132+
if (metric.equals("afe_latencies")) {
133+
assertWithMessage("Metric " + metric + " returned data.")
134+
.that(response.getTimeSeriesCount())
135+
.isEqualTo(0);
136+
} else {
137+
assertWithMessage("Metric " + metric + " didn't return any data.")
138+
.that(response.getTimeSeriesCount())
139+
.isGreaterThan(0);
140+
}
132141
}
133142
}
134143
}

0 commit comments

Comments
 (0)