Skip to content

Commit 65794f3

Browse files
committed
fix test case
1 parent 8bb32ee commit 65794f3

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

fe/fe-core/src/main/java/org/apache/doris/task/AgentTaskCleanupDaemon.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
public class AgentTaskCleanupDaemon extends MasterDaemon {
3434
private static final Logger LOG = LogManager.getLogger(AgentTaskCleanupDaemon.class);
3535

36+
public static final Integer MAX_FAILURE_TIMES = 3;
37+
3638
private final Map<Long, Integer> beInactiveCheckFailures = Maps.newHashMap();
3739

3840
public AgentTaskCleanupDaemon() {
@@ -51,7 +53,7 @@ protected void runAfterCatalogReady() {
5153
} else {
5254
Integer failureTimes = beInactiveCheckFailures.compute(id, (beId, failures) -> {
5355
int updated = (failures == null ? 1 : failures + 1);
54-
if (updated >= 2) {
56+
if (updated >= MAX_FAILURE_TIMES) {
5557
removeInactiveBeAgentTasks(beId);
5658
}
5759
return updated;

regression-test/suites/fault_injection_p0/test_sc_fail_when_be_down.groovy

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ suite("test_sc_fail_when_be_down", "docker") {
5959
assertTrue(false)
6060
} catch (Throwable ignore) {
6161
// do nothing
62-
} finally {
63-
GetDebugPoint().clearDebugPointsForAllBEs()
6462
}
6563
}
66-
}
64+
}

regression-test/suites/fault_injection_p0/test_sc_success_when_be_down.groovy

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,12 @@ suite("test_sc_success_when_be_down", "docker") {
4545
sql """ INSERT INTO ${tblName} SELECT number, number, number from numbers("number" = "1024") """
4646

4747
GetDebugPoint().enableDebugPointForAllBEs("SchemaChangeJob._do_process_alter_tablet.sleep")
48-
try {
49-
sql """ ALTER TABLE ${tblName} MODIFY COLUMN v0 VARCHAR(100) """
50-
sleep(3000)
51-
cluster.stopBackends(1)
52-
waitForSchemaChangeDone {
53-
sql """ SHOW ALTER TABLE COLUMN WHERE TableName='${tblName}' ORDER BY createtime DESC LIMIT 1 """
54-
time 600
55-
}
56-
} finally {
57-
GetDebugPoint().clearDebugPointsForAllBEs()
58-
}
48+
sql """ ALTER TABLE ${tblName} MODIFY COLUMN v0 VARCHAR(100) """
49+
sleep(3000)
50+
cluster.stopBackends(1)
51+
waitForSchemaChangeDone {
52+
sql """ SHOW ALTER TABLE COLUMN WHERE TableName='${tblName}' ORDER BY createtime DESC LIMIT 1 """
53+
time 600
54+
}
5955
}
6056
}

0 commit comments

Comments
 (0)