[ISSUE-244] Fix flaky test of CoordinatorGrpcTest.rpcMetricsTest (#256)
### What changes were proposed in this pull request?
[ISSUE-244] Fix flaky test of CoordinatorGrpcTest.rpcMetricsTest
### Why are the changes needed?
1. The gauge metric of `HEARTBEAT_METHOD` is hard to meansure due to async sending at background. So remove it
2. The gauge metric of `GET_SHUFFLE_ASSIGNMENTS_METHOD` may be not called `descCounter` when rpc finished, so remove it
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Dont need
diff --git a/integration-test/common/src/test/java/org/apache/uniffle/test/CoordinatorGrpcTest.java b/integration-test/common/src/test/java/org/apache/uniffle/test/CoordinatorGrpcTest.java
index c09067e..3cc7963 100644
--- a/integration-test/common/src/test/java/org/apache/uniffle/test/CoordinatorGrpcTest.java
+++ b/integration-test/common/src/test/java/org/apache/uniffle/test/CoordinatorGrpcTest.java
@@ -245,13 +245,10 @@
public void rpcMetricsTest() throws Exception {
double oldValue = coordinators.get(0).getGrpcMetrics().getCounterMap()
.get(CoordinatorGrpcMetrics.HEARTBEAT_METHOD).get();
- CoordinatorTestUtils.waitForRegister(coordinatorClient,2);
+ CoordinatorTestUtils.waitForRegister(coordinatorClient, 2);
double newValue = coordinators.get(0).getGrpcMetrics().getCounterMap()
.get(CoordinatorGrpcMetrics.HEARTBEAT_METHOD).get();
assertTrue(newValue - oldValue > 1);
- assertEquals(0,
- coordinators.get(0).getGrpcMetrics().getGaugeMap()
- .get(CoordinatorGrpcMetrics.HEARTBEAT_METHOD).get(), 0.5);
String appId = "rpcMetricsTest";
RssGetShuffleAssignmentsRequest request = new RssGetShuffleAssignmentsRequest(
@@ -263,9 +260,6 @@
newValue = coordinators.get(0).getGrpcMetrics().getCounterMap()
.get(CoordinatorGrpcMetrics.GET_SHUFFLE_ASSIGNMENTS_METHOD).get();
assertEquals(oldValue + 1, newValue, 0.5);
- assertEquals(0,
- coordinators.get(0).getGrpcMetrics().getGaugeMap()
- .get(CoordinatorGrpcMetrics.GET_SHUFFLE_ASSIGNMENTS_METHOD).get(), 0.5);
double connectionSize = coordinators.get(0)
.getGrpcMetrics().getGaugeMap().get(GRCP_SERVER_CONNECTION_NUMBER_KEY).get();