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 43189bbc [MINOR] test: Fix the flaky test `GrpcServerTest` (#789)
43189bbc is described below
commit 43189bbcad9c04d258ac780e7f774174b4487bc5
Author: java-codehunger <[email protected]>
AuthorDate: Sat Apr 8 02:05:14 2023 -0500
[MINOR] test: Fix the flaky test `GrpcServerTest` (#789)
### What changes were proposed in this pull request?
Increasing a little bit wait time.
### Why are the changes needed?
This test is flakily fails. I run this test many times and it makes
assertion fails. The failure message is as follows.
Failure:
[INFO] Running org.apache.uniffle.common.rpc.GrpcServerTest
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
0.185 s <<< FAILURE! - in org.apache.uniffle.common.rpc.GrpcServerTest
[ERROR] testGrpcExecutorPool Time elapsed: 0.142 s <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <2.0> but was: <0.0>
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at
org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at
org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:70)
at
org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:65)
at
org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:885)
at
org.apache.uniffle.common.rpc.GrpcServerTest.testGrpcExecutorPool(GrpcServerTest.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
at
org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
[ERROR] Failures:
[ERROR] GrpcServerTest.testGrpcExecutorPool:76 expected: <2.0> but was:
<0.0>
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
### How was this patch tested?
I run this test more than 1000 times and the test always passes.
Co-authored-by: other <[email protected]>
---
common/src/test/java/org/apache/uniffle/common/rpc/GrpcServerTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/common/src/test/java/org/apache/uniffle/common/rpc/GrpcServerTest.java
b/common/src/test/java/org/apache/uniffle/common/rpc/GrpcServerTest.java
index ebcb6c23..ace11602 100644
--- a/common/src/test/java/org/apache/uniffle/common/rpc/GrpcServerTest.java
+++ b/common/src/test/java/org/apache/uniffle/common/rpc/GrpcServerTest.java
@@ -68,7 +68,7 @@ public class GrpcServerTest {
});
}
- Thread.sleep(100);
+ Thread.sleep(120);
double activeThreads =
grpcMetrics.getGaugeMap().get(GRPC_SERVER_EXECUTOR_ACTIVE_THREADS_KEY).get();
assertEquals(2, activeThreads);
double queueSize =
grpcMetrics.getGaugeMap().get(GRPC_SERVER_EXECUTOR_BLOCKING_QUEUE_SIZE_KEY).get();