apache / apache/uniffle

[Flaky Test] ShuffleServerMetricsTest#testServerMetrics

Open
#809 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
454
Forks
172
Avg merge
5d 17h
Merged PRs (30d)
5

Description

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

### Search before asking

- [X] I have searched in the [issues](https://github.com/apache/incubator-uniffle/issues?q=is%3Aissue) and found no similar issues.

### Describe the flaky test

When run
```
mvn clean test -Pspark3.2
mvn clean test -Pspark2
```
it would cause
```
[ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.31 s <<< FAILURE! - in org.apache.uniffle.server.ShuffleServerMetricsTest
[ERROR] testServerMetrics Time elapsed: 0.225 s <<< FAILURE!
org.opentest4j.AssertionFailedError: array contents differ at index [1], expected: but was:
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:39)
at org.junit.jupiter.api.AssertArrayEquals.failArraysNotEqual(AssertArrayEquals.java:432)
at org.junit.jupiter.api.AssertArrayEquals.assertArrayElementsEqual(AssertArrayEquals.java:392)
at org.junit.jupiter.api.AssertArrayEquals.assertArrayEquals(AssertArrayEquals.java:349)
at org.junit.jupiter.api.AssertArrayEquals.assertArrayEquals(AssertArrayEquals.java:162)
at org.junit.jupiter.api.AssertArrayEquals.assertArrayEquals(AssertArrayEquals.java:158)
at org.junit.jupiter.api.Assertions.assertArrayEquals(Assertions.java:1452)
at org.apache.uniffle.server.ShuffleServerMetricsTest.validateMetrics(ShuffleServerMetricsTest.java:119)
at org.apache.uniffle.server.ShuffleServerMetricsTest.testServerMetrics(ShuffleServerMetricsTest.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
```

### Actions URL

Running `mvn clean test -Pspark2` locally will replicate

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start with org.apache.uniffle.server.ShuffleServerMetricsTest#testServerMetrics and its validateMetrics assertion at lines 109 and 119. Run mvn clean test -Pspark2 and the spark3.2 profile, then trace why the expected hdfs1 value can be reported as localhost. Done means the test passes reliably under both profiles without the observed array mismatch.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.