[SPARK-22644][ML][TEST] Make ML testsuite support StructuredStreaming test
## What changes were proposed in this pull request? We need to add some helper code to make testing ML transformers & models easier with streaming data. These tests might help us catch any remaining issues and we could encourage future PRs to use these tests to prevent new Models & Transformers from having issues. I add a `MLTest` trait which extends `StreamTest` trait, and override `createSparkSession`. So ML testsuite can only extend `MLTest`, to use both ML & Stream test util functions. I only modify one testcase in `LinearRegressionSuite`, for first pass review. Link to #19746 ## How was this patch tested? `MLTestSuite` added. Author: WeichenXu <weichen.xu@databricks.com> Closes #19843 from WeichenXu123/ml_stream_test_helper.
Showing
- mllib/pom.xml 14 additions, 0 deletionsmllib/pom.xml
- mllib/src/test/scala/org/apache/spark/ml/regression/LinearRegressionSuite.scala 4 additions, 4 deletions...rg/apache/spark/ml/regression/LinearRegressionSuite.scala
- mllib/src/test/scala/org/apache/spark/ml/util/MLTest.scala 91 additions, 0 deletionsmllib/src/test/scala/org/apache/spark/ml/util/MLTest.scala
- mllib/src/test/scala/org/apache/spark/ml/util/MLTestSuite.scala 47 additions, 0 deletions...src/test/scala/org/apache/spark/ml/util/MLTestSuite.scala
- sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala 46 additions, 21 deletions...est/scala/org/apache/spark/sql/streaming/StreamTest.scala
- sql/core/src/test/scala/org/apache/spark/sql/test/TestSQLContext.scala 1 addition, 1 deletion...test/scala/org/apache/spark/sql/test/TestSQLContext.scala
Please register or sign in to comment