-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-20407][TESTS] ParquetQuerySuite 'Enabling/disabling ignoreCorruptFiles' flaky test #17701
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,17 +17,18 @@ | |
|
|
||
| package org.apache.spark.sql.test | ||
|
|
||
| import scala.concurrent.duration._ | ||
|
|
||
| import org.scalatest.BeforeAndAfterEach | ||
| import org.scalatest.concurrent.Eventually | ||
|
|
||
| import org.apache.spark.{DebugFilesystem, SparkConf} | ||
| import org.apache.spark.sql.{SparkSession, SQLContext} | ||
| import org.apache.spark.sql.internal.SQLConf | ||
|
|
||
|
|
||
| /** | ||
| * Helper trait for SQL test suites where all tests share a single [[TestSparkSession]]. | ||
| */ | ||
| trait SharedSQLContext extends SQLTestUtils with BeforeAndAfterEach { | ||
| trait SharedSQLContext extends SQLTestUtils with BeforeAndAfterEach with Eventually { | ||
|
|
||
| protected val sparkConf = new SparkConf() | ||
|
|
||
|
|
@@ -84,6 +85,10 @@ trait SharedSQLContext extends SQLTestUtils with BeforeAndAfterEach { | |
|
|
||
| protected override def afterEach(): Unit = { | ||
| super.afterEach() | ||
| DebugFilesystem.assertNoOpenStreams() | ||
| // files can be closed from other threads, so wait a bit | ||
| // normally this doesn't take more than 1s | ||
| eventually(timeout(10.seconds)) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a catch all for when we are not using
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is so that DebugFilesystem.assertNoOpenStreams has a better chance of working. And in general, whatever else runs at the end of the test. For now it's just assertNoOpenStreams |
||
| DebugFilesystem.assertNoOpenStreams() | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might take a while to complete. Shall we ignore this? It is still useful to have for reference though.