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

Commit 279776d

Browse files
chore: port a couple of tests for csm2 (#2816)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Rollback plan is reviewed and LGTMed - [ ] All new data plane features have a completed end to end testing plan Fixes #<issue_number_goes_here> ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).
1 parent 571aec7 commit 279776d

5 files changed

Lines changed: 1265 additions & 1 deletion

File tree

google-cloud-bigtable/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,11 @@
255255
</dependency>
256256

257257
<!-- Test dependencies -->
258+
<dependency>
259+
<groupId>com.google.api.grpc</groupId>
260+
<artifactId>grpc-google-cloud-monitoring-v3</artifactId>
261+
<scope>test</scope>
262+
</dependency>
258263
<dependency>
259264
<groupId>com.google.api</groupId>
260265
<artifactId>gax</artifactId>

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/MethodInfo.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ public abstract class MethodInfo {
2828
/** If the method is streaming (ie a scan). */
2929
public abstract boolean getStreaming();
3030

31+
public static MethodInfo of(String name, boolean streaming) {
32+
return builder().setName(name).setStreaming(streaming).build();
33+
}
34+
3135
public static Builder builder() {
3236
return new AutoValue_MethodInfo.Builder();
3337
}

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/Constants.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ private MetricLabels() {}
5858

5959
static final AttributeKey<String> CHANNEL_POOL_LB_POLICY = AttributeKey.stringKey("lb_policy");
6060
static final AttributeKey<String> DP_REASON_KEY = AttributeKey.stringKey("reason");
61-
static final AttributeKey<String> DP_IP_PREFERENCE_KEY = AttributeKey.stringKey("reason");
61+
static final AttributeKey<String> DP_IP_PREFERENCE_KEY =
62+
AttributeKey.stringKey("ip_preference");
6263

6364
public static final AttributeKey<String> STATUS_KEY = AttributeKey.stringKey("status");
6465

0 commit comments

Comments
 (0)