aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/streaming/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/pyspark/streaming/tests.py')
-rw-r--r--python/pyspark/streaming/tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/pyspark/streaming/tests.py b/python/pyspark/streaming/tests.py
index f7fa481d50..179479625b 100644
--- a/python/pyspark/streaming/tests.py
+++ b/python/pyspark/streaming/tests.py
@@ -596,6 +596,13 @@ class StreamingContextTests(PySparkStreamingTestCase):
self.ssc = StreamingContext.getActiveOrCreate(None, setupFunc)
self.assertTrue(self.setupCalled)
+ def test_await_termination_or_timeout(self):
+ self._add_input_stream()
+ self.ssc.start()
+ self.assertFalse(self.ssc.awaitTerminationOrTimeout(0.001))
+ self.ssc.stop(False)
+ self.assertTrue(self.ssc.awaitTerminationOrTimeout(0.001))
+
class CheckpointTests(unittest.TestCase):