Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit 3a4ba20

Browse files
committed
fix directpath test
1 parent 2f9111c commit 3a4ba20

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,13 @@ public class ITBuiltInMetricsTest {
5151

5252
private static MetricServiceClient metricClient;
5353

54-
private static final String[] METRICS = {
55-
"operation_latencies",
56-
"attempt_latencies",
57-
"operation_count",
58-
"attempt_count",
59-
"gfe_latencies",
60-
"afe_latencies"
61-
};
54+
private static java.util.List<String> METRICS = new java.util.ArrayList<String>() {{
55+
add("operation_latencies");
56+
add("attempt_latencies");
57+
add("operation_count");
58+
add("attempt_count");
59+
add("afe_latencies");
60+
}};
6261

6362
@BeforeClass
6463
public static void setUp() throws IOException {
@@ -67,6 +66,9 @@ public static void setUp() throws IOException {
6766
// Enable BuiltinMetrics when the metrics are GA'ed
6867
db = env.getTestHelper().createTestDatabase();
6968
client = env.getTestHelper().getDatabaseClient(db);
69+
if(!env.getTestHelper().getOptions().isEnableDirectAccess()) {
70+
METRICS.add("gfe_latencies");
71+
}
7072
}
7173

7274
@After

0 commit comments

Comments
 (0)