Skip to content

Commit

Permalink
Test concurrent update without partition
Browse files Browse the repository at this point in the history
  • Loading branch information
pajaks committed Dec 19, 2024
1 parent a99d96e commit fa149bc
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,22 @@ void testConcurrentNonOverlappingUpdate()
@Test
void testConcurrentOverlappingUpdate()
throws Exception
{
testConcurrentOverlappingUpdate(false);
testConcurrentOverlappingUpdate(true);
}

private void testConcurrentOverlappingUpdate(boolean partitioned)
throws Exception
{
int threads = 3;
CyclicBarrier barrier = new CyclicBarrier(threads);
ExecutorService executor = newFixedThreadPool(threads);
String tableName = "test_concurrent_overlapping_updates_table_" + randomNameSuffix();

assertUpdate("CREATE TABLE " + tableName + " (a, part) WITH (partitioning = ARRAY['part']) AS VALUES (1, 10), (11, 20), (21, 30), (31, 40)", 4);
assertUpdate("CREATE TABLE " + tableName + " (a, part) " +
(partitioned ? " WITH (partitioning = ARRAY['part'])" : "") +
" AS VALUES (1, 10), (11, 20), (21, 30), (31, 40)", 4);

try {
List<Future<Boolean>> futures = IntStream.range(0, threads)
Expand Down

0 comments on commit fa149bc

Please sign in to comment.