Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-24022][TEST] Make SparkContextSuite not flaky #21105

Closed
wants to merge 1 commit into from

Conversation

gaborgsomogyi
Copy link
Contributor

What changes were proposed in this pull request?

SparkContextSuite.test("Cancelling stages/jobs with custom reasons.") could stay in an infinite loop because of the problem found and fixed in SPARK-23775.

This PR solves this mentioned flakyness by removing shared variable usages when cancel happens in a loop and using wait and CountDownLatch for synhronization.

How was this patch tested?

Existing unit test.

@SparkQA
Copy link

SparkQA commented Apr 19, 2018

Test build #89568 has finished for PR 21105 at commit 6e265f8.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gaborgsomogyi
Copy link
Contributor Author

cc @vanzin @jiangxb1987

@gaborgsomogyi
Copy link
Contributor Author

@jiangxb1987 Here it's possible to create a separate context.

@jiangxb1987
Copy link
Contributor

QQ: Have we observed the test case being flaky before?

@gaborgsomogyi
Copy link
Contributor Author

gaborgsomogyi commented Apr 19, 2018

Yes, please see SPARK-22764.

@vanzin
Copy link
Contributor

vanzin commented Apr 19, 2018

LGTM. Merging to master / 2.3.

asfgit pushed a commit that referenced this pull request Apr 19, 2018
## What changes were proposed in this pull request?

SparkContextSuite.test("Cancelling stages/jobs with custom reasons.") could stay in an infinite loop because of the problem found and fixed in [SPARK-23775](https://issues.apache.org/jira/browse/SPARK-23775).

This PR solves this mentioned flakyness by removing shared variable usages when cancel happens in a loop and using wait and CountDownLatch for synhronization.

## How was this patch tested?

Existing unit test.

Author: Gabor Somogyi <gabor.g.somogyi@gmail.com>

Closes #21105 from gaborgsomogyi/SPARK-24022.

(cherry picked from commit e55953b)
Signed-off-by: Marcelo Vanzin <vanzin@cloudera.com>
@asfgit asfgit closed this in e55953b Apr 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants