Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
qidaye committed Nov 8, 2024
1 parent 3153181 commit 4ddb65f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,9 @@ protected void runWaitingTxnJob() throws AlterCancelException {

LOG.info("invertedIndexBatchTask:{}", invertedIndexBatchTask);
AgentTaskQueue.addBatchTask(invertedIndexBatchTask);
AgentTaskExecutor.submit(invertedIndexBatchTask);
if (!FeConstants.runningUnitTest) {
AgentTaskExecutor.submit(invertedIndexBatchTask);
}
} finally {
olapTable.readUnlock();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ public void testBuildIndexFailedWithMinFailedNum() throws Exception {
// if task error is not OBTAIN_LOCK_FAILED, the job should be failed after MIN_FAILED_NUM = 3 times
AgentTask agentTask = tasks.get(0);
agentTask.setErrorCode(TStatusCode.IO_ERROR);
Assert.assertEquals(agentTask.getFailedTimes(), 0);
for (int i = 0; i < IndexChangeJob.MIN_FAILED_NUM; i++) {
agentTask.failed();
schemaChangeHandler.runAfterCatalogReady();
Expand Down Expand Up @@ -541,6 +542,7 @@ public void testBuildIndexFailedWithMaxFailedNum() throws Exception {
// if task error is OBTAIN_LOCK_FAILED, the job should be failed after MAX_FAILED_NUM = 10 times
AgentTask agentTask = tasks.get(0);
agentTask.setErrorCode(TStatusCode.OBTAIN_LOCK_FAILED);
Assert.assertEquals(agentTask.getFailedTimes(), 0);
for (int i = 0; i < IndexChangeJob.MAX_FAILED_NUM; i++) {
agentTask.failed();
schemaChangeHandler.runAfterCatalogReady();
Expand Down

0 comments on commit 4ddb65f

Please sign in to comment.