Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cc4a3a3

Browse files
committed
Merge branch 'rel_future_beta' into fix_merge_partitions
2 parents d62a542 + 61c01f6 commit cc4a3a3

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

tests/python/partitioning_test.py

+17-3
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,14 @@ def test_conc_part_drop_runtime_append(self):
647647
# Create two separate connections for this test
648648
with node.connect() as con1, node.connect() as con2:
649649

650+
try:
651+
from queue import Queue
652+
except ImportError:
653+
from Queue import Queue
654+
655+
# return values from thread
656+
queue = Queue()
657+
650658
# Thread for connection #2 (it has to wait)
651659
def con2_thread():
652660
con1.begin()
@@ -678,9 +686,9 @@ def con2_thread():
678686
has_drop_test_4 = True
679687
continue
680688

681-
self.assertTrue(has_runtime_append)
682-
self.assertFalse(has_drop_test_1)
683-
self.assertTrue(has_drop_test_4)
689+
# return all values in tuple
690+
queue.put((has_runtime_append, has_drop_test_1, has_drop_test_4))
691+
684692

685693
# Step 1: cache partitioned table in con1
686694
con1.begin()
@@ -725,6 +733,12 @@ def con2_thread():
725733
# check number of partitions
726734
self.assertEqual(len(rows), 99)
727735

736+
# check RuntimeAppend + selected partitions
737+
(has_runtime_append, has_drop_test_1, has_drop_test_4) = queue.get()
738+
self.assertTrue(has_runtime_append)
739+
self.assertFalse(has_drop_test_1)
740+
self.assertTrue(has_drop_test_4)
741+
728742
# Stop instance and finish work
729743
node.stop()
730744
node.cleanup()

0 commit comments

Comments
 (0)