Skip to content

Commit aae1b35

Browse files
committed
make the test more readable
1 parent 9cb143a commit aae1b35

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/RpcViewConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ class RpcViewConstants {
156156
BIGTABLE_OP,
157157
BIGTABLE_STATUS));
158158

159+
// use distribution so we can correlate batch throttled time with op_latency
159160
static final View BIGTABLE_BATCH_THROTTLED_TIME_VIEW =
160161
View.create(
161162
View.Name.create("cloud.google.com/java/bigtable/batch_throttled_time"),

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/misc_utilities/MethodComparator.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,9 @@ public class MethodComparator {
3131
MethodComparator::compareMethods, "compare method names, parameters and return types");
3232

3333
private static boolean compareMethods(Method actual, Method expected) {
34-
if (!actual.getName().equals(expected.getName())
35-
|| !Arrays.equals(actual.getParameterTypes(), expected.getParameterTypes())
36-
|| actual.getModifiers() != expected.getModifiers()
37-
|| !actual.getReturnType().equals(expected.getReturnType())) {
38-
return false;
39-
}
40-
return true;
34+
return actual.getName().equals(expected.getName())
35+
&& Arrays.equals(actual.getParameterTypes(), expected.getParameterTypes())
36+
&& actual.getModifiers() == expected.getModifiers()
37+
&& actual.getReturnType().equals(expected.getReturnType());
4138
}
4239
}

0 commit comments

Comments
 (0)