|
24 | 24 | import com.google.cloud.spanner.*; |
25 | 25 | import com.google.cloud.spanner.testing.EmulatorSpannerHelper; |
26 | 26 | import com.google.common.base.Stopwatch; |
27 | | -import com.google.common.base.Strings; |
28 | | -import com.google.common.truth.IntegerSubject; |
29 | 27 | import com.google.monitoring.v3.ListTimeSeriesRequest; |
30 | 28 | import com.google.monitoring.v3.ListTimeSeriesResponse; |
31 | 29 | import com.google.monitoring.v3.ProjectName; |
@@ -130,29 +128,9 @@ public void testBuiltinMetricsWithDefaultOTEL() throws Exception { |
130 | 128 | response = metricClient.listTimeSeriesCallable().call(request); |
131 | 129 | } |
132 | 130 |
|
133 | | - // afe_latencies metric currently does not return data as afe server-timing header is |
134 | | - // disabled. |
135 | | - // Keeping this check to enable this check in the future. |
136 | | - if (metric.equals("afe_latencies")) { |
137 | | - IntegerSubject subject = |
138 | | - assertWithMessage("Metric " + metric + " returned data.") |
139 | | - .that(response.getTimeSeriesCount()); |
140 | | - if (isAfeMetricEnabled()) { |
141 | | - subject.isGreaterThan(0); |
142 | | - } else { |
143 | | - subject.isEqualTo(0); |
144 | | - } |
145 | | - |
146 | | - } else { |
147 | | - assertWithMessage("Metric " + metric + " didn't return any data.") |
148 | | - .that(response.getTimeSeriesCount()) |
149 | | - .isGreaterThan(0); |
150 | | - } |
| 131 | + assertWithMessage("Metric " + metric + " didn't return any data.") |
| 132 | + .that(response.getTimeSeriesCount()) |
| 133 | + .isGreaterThan(0); |
151 | 134 | } |
152 | 135 | } |
153 | | - |
154 | | - private boolean isAfeMetricEnabled() { |
155 | | - String jobType = System.getenv("JOB_TYPE"); |
156 | | - return !Strings.isNullOrEmpty(jobType) && jobType.contains("devel"); |
157 | | - } |
158 | 136 | } |
0 commit comments