You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/13 14:51:16 UTC

[GitHub] [spark] shahidki31 commented on a change in pull request #24079: [SPARK-27145][Minor]Close store in the SQLAppStatusListenerSuite after test

shahidki31 commented on a change in pull request #24079: [SPARK-27145][Minor]Close store  in the SQLAppStatusListenerSuite after test
URL: https://github.com/apache/spark/pull/24079#discussion_r265166923
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListenerSuite.scala
 ##########
 @@ -43,13 +44,25 @@ import org.apache.spark.util.{AccumulatorMetadata, JsonProtocol, LongAccumulator
 import org.apache.spark.util.kvstore.InMemoryStore
 
 
-class SQLAppStatusListenerSuite extends SparkFunSuite with SharedSQLContext with JsonTestUtils {
+class SQLAppStatusListenerSuite extends SparkFunSuite with SharedSQLContext with JsonTestUtils
+  with BeforeAndAfter {
+
   import testImplicits._
 
   override protected def sparkConf = {
     super.sparkConf.set(LIVE_ENTITY_UPDATE_PERIOD, 0L).set(ASYNC_TRACKING_ENABLED, false)
   }
 
+  private var kvstore: ElementTrackingStore = _
+
+  before {
+    kvstore = new ElementTrackingStore(new InMemoryStore, sparkContext.conf)
 
 Review comment:
   Thanks @srowen for the comment.
   Out of 10 test cases, 7 uses the kvstore.  
   kvstore won't be null in 'after' block in any test cases. I think AppStatusListenerSuite doesn't check for null.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org