holdenk / spark-testing-base

Base classes to use when writing tests with Spark
Apache License 2.0
1.52k stars 358 forks source link

What is the reason this project uses inheritance rather than implementing Junit's Rule? #400

Open BenjaminMalley opened 1 year ago

BenjaminMalley commented 1 year ago

Hi, thanks for this project! I'm curious about the rationale for using inheritance rather than implementing a Junit Rule. If I understand correctly how this works, it seems like the reuse a SparkContext in multiple tests outlined here could be resolved by implementing rule and letting the test implementation decide on granularity using the @ClassRule or @Rule annotations. I'm curious if the Rule approach was tried already and deemed inadequate. Thanks!