This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 8040ba7fb9 [Fix](regression-test) Fix stream load 2pc case (#24925)
8040ba7fb9 is described below
commit 8040ba7fb912a660c556e860d732916cc69c51f6
Author: HHoflittlefish777 <[email protected]>
AuthorDate: Thu Sep 28 22:34:59 2023 +0800
[Fix](regression-test) Fix stream load 2pc case (#24925)
---
.../load_p0/stream_load/test_stream_load.groovy | 17 ++++++++++++++-
.../stream_load/test_stream_load_properties.groovy | 24 ++++++++++++++++++++--
2 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/regression-test/suites/load_p0/stream_load/test_stream_load.groovy
b/regression-test/suites/load_p0/stream_load/test_stream_load.groovy
index 1deb7dc626..cf25e15d6e 100644
--- a/regression-test/suites/load_p0/stream_load/test_stream_load.groovy
+++ b/regression-test/suites/load_p0/stream_load/test_stream_load.groovy
@@ -1076,7 +1076,22 @@ suite("test_stream_load", "p0") {
}
do_streamload_2pc.call(label, "commit")
- sleep(60)
+
+ def count = 0
+ while (true) {
+ res = sql "select count(*) from ${tableName15}"
+ if (res[0][0] > 0) {
+ break
+ }
+ if (count >= 60) {
+ log.error("stream load commit can not visible for long time")
+ assertEquals(2, res[0][0])
+ break
+ }
+ sleep(1000)
+ count++
+ }
+
qt_sql_2pc_commit "select * from ${tableName15} order by k1"
} finally {
sql """ DROP TABLE IF EXISTS ${tableName15} FORCE"""
diff --git
a/regression-test/suites/load_p0/stream_load/test_stream_load_properties.groovy
b/regression-test/suites/load_p0/stream_load/test_stream_load_properties.groovy
index 2b8d56a7a4..19e707f385 100644
---
a/regression-test/suites/load_p0/stream_load/test_stream_load_properties.groovy
+++
b/regression-test/suites/load_p0/stream_load/test_stream_load_properties.groovy
@@ -559,7 +559,26 @@ suite("test_stream_load_properties", "p0") {
do_streamload_2pc.call(txnId, "commit", tableName1)
- sleep(60)
+ def count = 0
+ while (true) {
+ def res
+ if (i <= 3) {
+ res = sql "select count(*) from ${tableName1}"
+ } else {
+ res = sql "select count(*) from ${tableName1}"
+ }
+ if (res[0][0] > 0) {
+ break
+ }
+ if (count >= 60) {
+ log.error("stream load commit can not visible for long
time")
+ assertEquals(20, res[0][0])
+ break
+ }
+ sleep(1000)
+ count++
+ }
+
if (i <= 3) {
qt_sql_2pc_commit "select * from ${tableName1} order by
k00,k01"
} else {
@@ -570,7 +589,8 @@ suite("test_stream_load_properties", "p0") {
}
} finally {
for (String tableName in tables) {
- sql new
File("""${context.file.parent}/ddl/${tableName}_drop.sql""").text
+ def tableName1 = "stream_load_" + tableName
+ sql "DROP TABLE IF EXISTS ${tableName1} FORCE"
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]