grpc-ecosystem / grpc-ecosystem/grpc-spring

Randomly failing metrics test

Open
#603 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
3.7k
Forks
858
PR merge metrics
No merged PRs in 30d

Description

This test seems to still fail randomly/rarely during CI builds unfortunately I cannot reproduce this error locally.

````txt
MetricCollectingInterceptorTest > testMetricsFailedCall() FAILED
org.opentest4j.AssertionFailedError: execution timed out after 1000 ms
at org.junit.jupiter.api.AssertTimeout.assertTimeoutPreemptively(AssertTimeout.java:158)
at org.junit.jupiter.api.AssertTimeout.assertTimeoutPreemptively(AssertTimeout.java:119)
at org.junit.jupiter.api.AssertTimeout.assertTimeoutPreemptively(AssertTimeout.java:101)
at org.junit.jupiter.api.AssertTimeout.assertTimeoutPreemptively(AssertTimeout.java:97)
at org.junit.jupiter.api.Assertions.assertTimeoutPreemptively(Assertions.java:3323)
at net.devh.boot.grpc.test.metric.MetricCollectingInterceptorTest.testMetricsFailedCall(MetricCollectingInterceptorTest.java:497)

Caused by:
org.junit.jupiter.api.AssertTimeout$ExecutionTimeoutException: Execution timed out in thread junit-timeout-thread-6
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
at net.devh.boot.grpc.test.metric.MetricCollectingInterceptorTest$$Lambda$1056/1236908650.execute(Unknown Source)
at org.junit.jupiter.api.AssertTimeout.lambda$assertTimeoutPreemptively$2(AssertTimeout.java:102)
at org.junit.jupiter.api.AssertTimeout$$Lambda$1040/1085016662.get(Unknown Source)
at org.junit.jupiter.api.AssertTimeout.lambda$assertTimeoutPreemptively$4(AssertTimeout.java:138)
at org.junit.jupiter.api.AssertTimeout$$Lambda$1041/196414950.call(Unknown Source)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
````

Contributor guide

Open the contributing guide

Research direction

Start with MetricCollectingInterceptorTest.java, especially testMetricsFailedCall() around line 497, and review the CI timeout trace showing CountDownLatch.await. Reproduce the intermittent failure in CI or repeated test runs, then confirm the test completes reliably without the 1000 ms timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.