Skip to content

Commit 468b7c0

Browse files
authored
chore: disable afe latency metric test (#4050)
1 parent b7f61ab commit 468b7c0

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
@@ -128,9 +128,18 @@ public void testBuiltinMetricsWithDefaultOTEL() throws Exception {
128128
response = metricClient.listTimeSeriesCallable().call(request);
129129
}
130130

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

0 commit comments

Comments
 (0)