diff options
author | Shixiong Zhu <shixiong@databricks.com> | 2016-04-18 14:41:45 -0700 |
---|---|---|
committer | Shixiong Zhu <shixiong@databricks.com> | 2016-04-18 14:41:45 -0700 |
commit | 6ff0435858eed8310c0298ef0394053dfe06df9e (patch) | |
tree | 487cedcdab5f7bef42871a29e2e6ba6f1b866280 /core/src/test/resources/HistoryServerExpectations/stage_task_list_expectation.json | |
parent | 68450c8c6e34df510f9e131147210a6c0c2eb56b (diff) | |
download | spark-6ff0435858eed8310c0298ef0394053dfe06df9e.tar.gz spark-6ff0435858eed8310c0298ef0394053dfe06df9e.tar.bz2 spark-6ff0435858eed8310c0298ef0394053dfe06df9e.zip |
[SPARK-14713][TESTS] Fix the flaky test NettyBlockTransferServiceSuite
## What changes were proposed in this pull request?
When there are multiple tests running, "NettyBlockTransferServiceSuite.can bind to a specific port twice and the second increments" may fail.
E.g., assume there are 2 tests running. Here are the execution order to reproduce the test failure.
| Execution Order | Test 1 | Test 2 |
| ------------- | ------------- | ------------- |
| 1 | service0 binds to 17634 | |
| 2 | | service0 binds to 17635 (17634 is occupied) |
| 3 | service1 binds to 17636 | |
| 4 | pass test | |
| 5 | service0.close (release 17634) | |
| 6 | | service1 binds to 17634 |
| 7 | | `service1.port should be (service0.port + 1)` fails (17634 != 17635 + 1) |
Here is an example in Jenkins: https://amplab.cs.berkeley.edu/jenkins/view/Spark%20QA%20Test/job/spark-master-test-maven-hadoop-2.2/786/testReport/junit/org.apache.spark.network.netty/NettyBlockTransferServiceSuite/can_bind_to_a_specific_port_twice_and_the_second_increments/
This PR makes two changes:
- Use a random port between 17634 and 27634 to reduce the possibility of port conflicts.
- Make `service1` use `service0.port` to bind to avoid the above race condition.
## How was this patch tested?
Jenkins unit tests.
Author: Shixiong Zhu <shixiong@databricks.com>
Closes #12477 from zsxwing/SPARK-14713.
Diffstat (limited to 'core/src/test/resources/HistoryServerExpectations/stage_task_list_expectation.json')
0 files changed, 0 insertions, 0 deletions