spark-instrumented-optimizer/repl/scala-2.11/src
Wenchen Fan f561a76b2f [SPARK-20548][FLAKY-TEST] share one REPL instance among REPL test cases
## What changes were proposed in this pull request?

`ReplSuite.newProductSeqEncoder with REPL defined class` was flaky and throws OOM exception frequently. By analyzing the heap dump, we found the reason is that, in each test case of `ReplSuite`, we create a REPL instance, which creates a classloader and loads a lot of classes related to `SparkContext`. More details please see https://github.com/apache/spark/pull/17833#issuecomment-298711435.

In this PR, we create a new test suite, `SingletonReplSuite`, which shares one REPL instances among all the test cases. Then we move most of the tests from `ReplSuite` to `SingletonReplSuite`, to avoid creating a lot of REPL instances and reduce memory footprint.

## How was this patch tested?

test only change

Author: Wenchen Fan <wenchen@databricks.com>

Closes #17844 from cloud-fan/flaky-test.
2017-05-10 00:09:35 +08:00
..
main/scala/org/apache/spark/repl [SPARK-20548][FLAKY-TEST] share one REPL instance among REPL test cases 2017-05-10 00:09:35 +08:00
test/scala/org/apache/spark/repl [SPARK-20548][FLAKY-TEST] share one REPL instance among REPL test cases 2017-05-10 00:09:35 +08:00