spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdas <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-8743] [Streaming]: Deregister Codahale ...
Date Fri, 10 Jul 2015 21:44:36 GMT
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7250#discussion_r34399120
  
    --- Diff: streaming/src/test/scala/org/apache/spark/streaming/StreamingContextSuite.scala
---
    @@ -297,6 +299,23 @@ class StreamingContextSuite extends SparkFunSuite with BeforeAndAfter
with Timeo
         Thread.sleep(100)
       }
     
    +  test("registering and de-registering of streamingSource") {
    +    val conf = new SparkConf().setMaster(master).setAppName(appName)
    +    ssc = new StreamingContext(conf, batchDuration)
    +    addInputStream(ssc).register()
    +
    +    ssc.start()
    +    assert(ssc.getState() === StreamingContextState.INITIALIZED)
    +    assert(StreamingContextSuite.sources.get(StreamingContextSuite.streamingSource)!=
"null")
    --- End diff --
    
    I dont get this statement here. You are calling StreamingContext.sources.get() on an object
of type `java.lang.reflect.Field` (that is, StreamingContextSuite.streamingSource) rather
than the actual StreamingContext object `ssc` above. And then you are comparing that it is
not the string "null"? I am not sure what is being tested here. 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message