Skip to content
Merged
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 @@ -30,6 +30,7 @@ suite("test_iot_auto_detect_concurrent") {
sql new File("""${context.file.parent}/ddl/test_iot_auto_detect_concurrent.sql""").text

def success_status = true
def err_msg = ""
def load_data = { range, offset, expect_success ->
try {
sql " use test_iot_auto_detect_concurrent; "
Expand All @@ -44,6 +45,7 @@ suite("test_iot_auto_detect_concurrent") {
success_status = false
log.info("fails one")
}
err_msg = e.getMessage()
log.info("successfully catch the failed insert")
return
}
Expand Down Expand Up @@ -105,10 +107,14 @@ suite("test_iot_auto_detect_concurrent") {
thread6.join()
thread7.join()
// suppose result: Success to overwrite with a multiple of ten values
assertTrue(success_status)
qt_sql3 " select count(k0) from test_concurrent_write; "
qt_sql4 " select count(distinct k0) from test_concurrent_write; "

if (!success_status) {
// Not allowed running Insert Overwrite on same table
assertTrue(err_msg.contains('same table'))
} else {
// The execution was fast, resulting in no concurrent execution
qt_sql3 " select count(k0) from test_concurrent_write; "
qt_sql4 " select count(distinct k0) from test_concurrent_write; "
}

/// with drop partition concurrently
success_status = true
Expand Down