Github user giwa commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2538#discussion_r18080721
  
    --- Diff: python/pyspark/streaming/tests.py ---
    @@ -0,0 +1,321 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +"""
    +Unit tests for Python SparkStreaming; additional tests are implemented as 
doctests in
    +individual modules.
    +
    +Callback server is sometimes unstable sometimes, which cause error in test 
case.
    +But this is very rare case.
    +"""
    +from itertools import chain
    +import time
    +import operator
    +import unittest
    +
    +from pyspark.context import SparkContext
    +from pyspark.streaming.context import StreamingContext
    +from pyspark.streaming.duration import Seconds
    +
    +
    +class PySparkStreamingTestCase(unittest.TestCase):
    +    def setUp(self):
    +        class_name = self.__class__.__name__
    +        self.sc = SparkContext(appName=class_name)
    +        self.ssc = StreamingContext(self.sc, duration=Seconds(1))
    +
    +    def tearDown(self):
    +        # Do not call pyspark.streaming.context.StreamingContext.stop 
directly because
    +        # we do not wait to shutdown py4j client.
    --- End diff --
    
    We do not need this comments because StreaminigContext.stop does not stop 
call back server.
    
    ```
            # Do not call pyspark.streaming.context.StreamingContext.stop 
directly because
            # we do not wait to shutdown py4j client.
    ```


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to