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 @@ -26,6 +26,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 @@ -37,6 +38,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 @@ -98,10 +100,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'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if hit this branch, the output will miss sql3 and sql4?

} 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