Repository: spark Updated Branches: refs/heads/master 7d878cf2d -> a9e79a41e
[SQL][STREAMING][TEST] Follow up to remove Option.contains for Scala 2.10 compatibility ## What changes were proposed in this pull request? Scala 2.10 does not have Option.contains, which broke Scala 2.10 build. ## How was this patch tested? Locally compiled and ran sql/core unit tests in 2.10 Author: Tathagata Das <[email protected]> Closes #15531 from tdas/metrics-flaky-test-fix-1. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/a9e79a41 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/a9e79a41 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/a9e79a41 Branch: refs/heads/master Commit: a9e79a41ee19258e5eb8da74bef4b8af9a2ccb95 Parents: 7d878cf Author: Tathagata Das <[email protected]> Authored: Tue Oct 18 02:29:55 2016 -0700 Committer: Tathagata Das <[email protected]> Committed: Tue Oct 18 02:29:55 2016 -0700 ---------------------------------------------------------------------- .../test/scala/org/apache/spark/sql/streaming/StreamTest.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/a9e79a41/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala ---------------------------------------------------------------------- diff --git a/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala b/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala index 254f823..8dfeb8d 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala @@ -216,7 +216,9 @@ trait StreamTest extends QueryTest with SharedSQLContext with Timeouts { } } - def isStreamWaitingAt(time: Long): Boolean = synchronized { waitStartTime.contains(time) } + def isStreamWaitingAt(time: Long): Boolean = synchronized { + waitStartTime == Some(time) + } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
