Skip to content

Commit

Permalink
make the test more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
mutianf committed Dec 9, 2021
1 parent 9cb143a commit aae1b35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Expand Up @@ -156,6 +156,7 @@ class RpcViewConstants {
BIGTABLE_OP,
BIGTABLE_STATUS));

// use distribution so we can correlate batch throttled time with op_latency
static final View BIGTABLE_BATCH_THROTTLED_TIME_VIEW =
View.create(
View.Name.create("cloud.google.com/java/bigtable/batch_throttled_time"),
Expand Down
Expand Up @@ -31,12 +31,9 @@ public class MethodComparator {
MethodComparator::compareMethods, "compare method names, parameters and return types");

private static boolean compareMethods(Method actual, Method expected) {
if (!actual.getName().equals(expected.getName())
|| !Arrays.equals(actual.getParameterTypes(), expected.getParameterTypes())
|| actual.getModifiers() != expected.getModifiers()
|| !actual.getReturnType().equals(expected.getReturnType())) {
return false;
}
return true;
return actual.getName().equals(expected.getName())
&& Arrays.equals(actual.getParameterTypes(), expected.getParameterTypes())
&& actual.getModifiers() == expected.getModifiers()
&& actual.getReturnType().equals(expected.getReturnType());
}
}

0 comments on commit aae1b35

Please sign in to comment.