This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 4b31e3d8 [ISSUE-244] Fix flaky test of
CoordinatorGrpcTest.rpcMetricsTest (#256)
4b31e3d8 is described below
commit 4b31e3d89bde50b137fb4c6c0af59cf5b4613808
Author: Junfan Zhang <[email protected]>
AuthorDate: Tue Oct 11 11:59:13 2022 +0800
[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
---
.../test/java/org/apache/uniffle/test/CoordinatorGrpcTest.java | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
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 c09067ea..3cc79632 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 class CoordinatorGrpcTest extends
CoordinatorTestBase {
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 @@ public class CoordinatorGrpcTest extends
CoordinatorTestBase {
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();