Skip to content

Commit

Permalink
[fix](regression) fix stream load properties case fail (#28680)
Browse files Browse the repository at this point in the history
  • Loading branch information
sollhui authored Dec 21, 2023
1 parent bcf2683 commit 0e0ad3c
Showing 1 changed file with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
def tableName1 = "stream_load_" + tableName
if (i <= 3) {
qt_sql_timezone_shanghai "select * from ${tableName1} order by k00,k01"
Expand Down Expand Up @@ -243,6 +244,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
def tableName1 = "stream_load_" + tableName
if (i <= 3) {
qt_sql_timezone_Abidjan "select * from ${tableName1} order by k00,k01"
Expand Down Expand Up @@ -287,6 +289,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
def tableName1 = "stream_load_" + tableName
if (i <= 3) {
qt_sql_strict_mode "select * from ${tableName1} order by k00,k01"
Expand Down Expand Up @@ -330,6 +333,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
def tableName1 = "stream_load_" + tableName
if (i <= 3) {
qt_sql_max_filter_ratio "select * from ${tableName1} order by k00,k01"
Expand Down Expand Up @@ -432,6 +436,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
qt_sql_squence "select * from stream_load_uniq_tbl_basic_sequence order by k00,k01"
} finally {
sql new File("""${context.file.parent}/ddl/uniq_tbl_basic_drop_sequence.sql""").text
Expand Down Expand Up @@ -464,6 +469,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"

streamLoad {
table "stream_load_" + tableName
Expand All @@ -486,6 +492,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
def tableName1 = "stream_load_" + tableName
qt_sql_merge_type "select * from ${tableName1} order by k00,k01"
} finally {
Expand Down Expand Up @@ -567,6 +574,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
txnId = "ABCxyz"
def body = do_streamload_2pc.call(txnId, "commit", tableName1)
assertEquals("internal_error", parseJson(body).status.toLowerCase())
Expand Down Expand Up @@ -595,11 +603,11 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
txnId += "100ABC"
body = do_streamload_2pc.call(txnId, "commit", tableName1)
assertEquals("analysis_error", parseJson(body).status.toLowerCase())
assertTrue(parseJson(body).msg.toLowerCase().contains("not found"))

if (i <= 3) {
qt_sql_2pc_invalid_txnid "select * from ${tableName1} order by k00,k01"
} else {
Expand Down Expand Up @@ -629,9 +637,10 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
body = do_streamload_2pc.call(txnId, "invalidop", tableName1)
assertEquals("internal_error", parseJson(body).status.toLowerCase())
assertTrue(parseJson(body).msg.toLowerCase().contains("transaction operation should be 'commit' or 'abort'"))
assertTrue(parseJson(body).msg.toLowerCase().contains("transaction operation should be 'commit' or 'abort'"))
if (i <= 3) {
qt_sql_2pc_invalid_operation "select * from ${tableName1} order by k00,k01"
} else {
Expand Down Expand Up @@ -660,6 +669,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"

if (i <= 3) {
qt_sql_2pc "select * from ${tableName1} order by k00,k01"
Expand All @@ -668,6 +678,7 @@ suite("test_stream_load_properties", "p0") {
}

do_streamload_2pc.call(txnId, "abort", tableName1)
sql "sync"

if (i <= 3) {
qt_sql_2pc_abort "select * from ${tableName1} order by k00,k01"
Expand Down Expand Up @@ -697,8 +708,10 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"

do_streamload_2pc.call(txnId, "commit", tableName1)
sql "sync"

def count = 0
while (true) {
Expand Down Expand Up @@ -818,6 +831,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
def tableName1 = "stream_load_" + tableName
if (i <= 3) {
qt_sql_skip_lines "select * from ${tableName1} order by k00,k01"
Expand Down Expand Up @@ -936,6 +950,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
def tableName1 = "stream_load_" + tableName
if (i <= 3) {
qt_sql_json_strip_outer_array "select * from ${tableName1} order by k00,k01"
Expand Down Expand Up @@ -982,6 +997,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
def tableName1 = "stream_load_" + tableName
if (i <= 3) {
qt_sql_json_jsonpath "select * from ${tableName1} order by k00,k01"
Expand Down Expand Up @@ -1027,6 +1043,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
def tableName1 = "stream_load_" + tableName
if (i <= 3) {
qt_sql_json_read_by_line "select * from ${tableName1} order by k00,k01"
Expand Down Expand Up @@ -1146,6 +1163,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
def tableName1 = "stream_load_" + tableName
if (i <= 3) {
qt_sql_json_read_by_line "select * from ${tableName1} order by k00,k01"
Expand Down Expand Up @@ -1194,6 +1212,7 @@ suite("test_stream_load_properties", "p0") {
assertEquals(0, json.NumberUnselectedRows)
}
}
sql "sync"
def tableName1 = "stream_load_" + tableName
if (i <= 3) {
qt_sql_json_read_by_line "select * from ${tableName1} order by k00,k01"
Expand Down

0 comments on commit 0e0ad3c

Please sign in to comment.