Intellij run Spark unit test

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Intellij run Spark unit test

Daniel Zhang

Hi, 


I have one question related to run unit test in Intellij.


I import spark into my Intellij as Maven project, and have no issue to build the whole project. 


While for some unit tests, I see they can be run directly in Intellij as unit tests, but others are not.


Just for example, in the test package: org.apache.spark.sql.hive.execution, there are 2 tests Scala class: PruningSuite and ScriptTransformationSuite, both eventually extends from SparkFunSuite.scala, which is subclass of scalatest FunSuite.


But in my Intellij, as shown in the picture:




The PruningSuite is marked as Scala class icon, and I can click it with "Run PruningSuite" directly, to run this unit test. But for ScriptTranformationSuite, it is marked with different icon, and the "Run ...." unit test option is not there.


Anyone knows the reason?


Thanks


Yong