From 6c2ecb2c79a619da10417b240ab4dd8944f2eca8 Mon Sep 17 00:00:00 2001 From: conan8737 Date: Sun, 4 Jan 2026 17:40:42 +0800 Subject: [PATCH] fix: resolve unit test failures --- dtmsvr/trans_status.go | 2 +- dtmsvr/trans_type_workflow.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dtmsvr/trans_status.go b/dtmsvr/trans_status.go index a8d5e00..742a094 100644 --- a/dtmsvr/trans_status.go +++ b/dtmsvr/trans_status.go @@ -232,7 +232,7 @@ func (t *TransGlobal) execBranch(ctx context.Context, branch *TransBranch, branc t.changeBranchStatus(branch, status, branchPos) } branchMetrics(t, branch, status == dtmcli.StatusSucceed) - + // if time pass 1500ms and NextCronInterval is not default, then reset NextCronInterval if err == nil && (time.Since(t.lastTouched)+NowForwardDuration >= 1500*time.Millisecond || t.NextCronInterval > conf.RetryInterval && t.NextCronInterval > t.RetryInterval) { t.touchCronTime(cronReset, 0) diff --git a/dtmsvr/trans_type_workflow.go b/dtmsvr/trans_type_workflow.go index d1de51c..da6bd45 100644 --- a/dtmsvr/trans_type_workflow.go +++ b/dtmsvr/trans_type_workflow.go @@ -42,7 +42,6 @@ func (t *transWorkflowProcessor) ProcessOnce(ctx context.Context, branches []Tra data = dtmgimp.MustProtoMarshal(&wd) } err := t.getURLResult(ctx, t.QueryPrepared, "00", cmc.Name, data) - // if time pass 1500ms and NextCronInterval is not default, then reset NextCronInterval if err == dtmimp.ErrOngoing { t.touchCronTime(cronKeep, 0) } else if err != nil {