Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ def _test_transform_with_state_basic(
self.assertEqual(q.name, "this_query")
self.assertTrue(q.isActive)
q.processAllAvailable()
q.stop()
q.awaitTermination(10)
self.assertTrue(q.exception() is None)

Expand Down Expand Up @@ -255,21 +256,21 @@ def test_transform_with_state_query_restarts(self):
self.assertEqual(q.name, "this_query")
self.assertTrue(q.isActive)
q.processAllAvailable()
q.stop()
q.awaitTermination(10)
self.assertTrue(q.exception() is None)

# Verify custom metrics.
self.assertTrue(q.lastProgress.stateOperators[0].customMetrics["numValueStateVars"] > 0)
self.assertTrue(q.lastProgress.stateOperators[0].customMetrics["numDeletedStateVars"] > 0)

q.stop()

self._prepare_test_resource2(input_path)

q = base_query.start()
self.assertEqual(q.name, "this_query")
self.assertTrue(q.isActive)
q.processAllAvailable()
q.stop()
q.awaitTermination(10)
self.assertTrue(q.exception() is None)
result_df = self.spark.read.parquet(output_path)
Expand Down Expand Up @@ -329,6 +330,7 @@ def _test_transform_with_state_proc_timer(self, stateful_processor_factory, chec
self.assertEqual(q.name, query_name)
self.assertTrue(q.isActive)
q.processAllAvailable()
q.stop()
q.awaitTermination(10)
self.assertTrue(q.exception() is None)

Expand Down Expand Up @@ -446,6 +448,7 @@ def prepare_batch3(input_path):
self.assertEqual(q.name, query_name)
self.assertTrue(q.isActive)
q.processAllAvailable()
q.stop()
q.awaitTermination(10)
self.assertTrue(q.exception() is None)

Expand Down Expand Up @@ -561,6 +564,7 @@ def _test_transform_with_state_non_contiguous_grouping_cols(
self.assertEqual(q.name, "this_query")
self.assertTrue(q.isActive)
q.processAllAvailable()
q.stop()
q.awaitTermination(10)
self.assertTrue(q.exception() is None)

Expand Down Expand Up @@ -657,6 +661,7 @@ def _test_transform_with_state_chaining_ops(
self.assertEqual(q.name, "chaining_ops_query")
self.assertTrue(q.isActive)
q.processAllAvailable()
q.stop()
q.awaitTermination(10)

def test_transform_with_state_chaining_ops(self):
Expand Down Expand Up @@ -1168,6 +1173,7 @@ def _run_evolution_test(self, processor_factory, checkpoint_dir, check_results,
self.assertEqual(q.name, "evolution_test")
self.assertTrue(q.isActive)
q.processAllAvailable()
q.stop()
q.awaitTermination(10)

def test_schema_evolution_scenarios(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def _test_transform_with_state_basic(
self.assertEqual(q.name, "this_query")
self.assertTrue(q.isActive)
q.processAllAvailable()
q.stop()
q.awaitTermination(10)
self.assertTrue(q.exception() is None)

Expand Down Expand Up @@ -291,6 +292,7 @@ def check_results(batch_df, batch_id):
self.assertEqual(q.name, "this_query")
self.assertTrue(q.isActive)
q.processAllAvailable()
q.stop()
q.awaitTermination(10)
self.assertTrue(q.exception() is None)

Expand Down Expand Up @@ -514,6 +516,7 @@ def _test_transform_with_state_init_state(
self.assertEqual(q.name, "this_query")
self.assertTrue(q.isActive)
q.processAllAvailable()
q.stop()
q.awaitTermination(10)
self.assertTrue(q.exception() is None)

Expand Down