Skip to content

Commit

Permalink
[fix](cases) fix broker_load & schema_change & table_property cases
Browse files Browse the repository at this point in the history
1. log more info to investigate problem.
2. use def in groovy to avoid gloabl namespace
  • Loading branch information
dataroaring committed May 20, 2024
1 parent fb89a46 commit d46c783
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ suite ("test_alter_table_property") {

def queryReplicaCount = { partitionName ->
def result = sql "SHOW REPLICA DISTRIBUTION FROM ${tableName} PARTITION ${partitionName}"
logger.info("${result}")
int sum = 0
for (row in result) {
sum += row[1].toInteger()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ suite("test_broker_load_p2", "p2") {
for (String label in uuids) {
def max_try_milli_secs = 600000
while (max_try_milli_secs > 0) {
String[][] result = sql """ show load where label="$label" order by createtime desc limit 1; """
def String[][] result = sql """ show load where label="$label" order by createtime desc limit 1; """
logger.info("Load status: " + result[0][2] + ", label: $label")
if (result[0][2].equals("FINISHED")) {
logger.info("Load FINISHED " + label)
assertTrue(result[0][6].contains(task_info[i]))
Expand All @@ -347,7 +348,7 @@ suite("test_broker_load_p2", "p2") {
def orc_expect_result = """[[20, 15901, 6025915247311731176, 1373910657, 8863282788606566657], [38, 15901, -9154375582268094750, 1373853561, 4923892366467329038], [38, 15901, -9154375582268094750, 1373853561, 8447995939656287502], [38, 15901, -9154375582268094750, 1373853565, 7451966001310881759], [38, 15901, -9154375582268094750, 1373853565, 7746521994248163870], [38, 15901, -9154375582268094750, 1373853577, 6795654975682437824], [38, 15901, -9154375582268094750, 1373853577, 9009208035649338594], [38, 15901, -9154375582268094750, 1373853608, 6374361939566017108], [38, 15901, -9154375582268094750, 1373853608, 7387298457456465364], [38, 15901, -9154375582268094750, 1373853616, 7463736180224933002]]"""
for (String table in tables) {
if (table.matches("orc_s3_case[23456789]")) {
String[][] orc_actual_result = sql """select CounterID, EventDate, UserID, EventTime, WatchID from $table order by CounterID, EventDate, UserID, EventTime, WatchID limit 10;"""
def String[][] orc_actual_result = sql """select CounterID, EventDate, UserID, EventTime, WatchID from $table order by CounterID, EventDate, UserID, EventTime, WatchID limit 10;"""
assertTrue("$orc_actual_result" == "$orc_expect_result")
}
}
Expand Down Expand Up @@ -402,7 +403,8 @@ suite("test_broker_load_p2", "p2") {

def max_try_milli_secs = 600000
while (max_try_milli_secs > 0) {
String[][] result = sql """ show load where label="$label_22666" order by createtime desc limit 1; """
def String[][] result = sql """ show load where label="$label_22666" order by createtime desc limit 1; """
logger.info("Load status: " + result[0][2] + ", label: $label_22666")
if (result[0][2].equals("FINISHED")) {
logger.info("Load FINISHED " + label_22666)
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ suite("test_schema_change") {
)
"""

waitBrokerLoadJob = { String label /* param */ ->
def waitBrokerLoadJob = { String label /* param */ ->
// check load state
int tryTimes = 20
while (tryTimes-- > 0) {
Expand Down

0 comments on commit d46c783

Please sign in to comment.