Commit ab12ba5 1 parent b6d96fd commit ab12ba5 Copy full SHA for ab12ba5
File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ import (
69
69
"github.com/pingcap/tidb/util/engine"
70
70
"github.com/pingcap/tidb/util/etcd"
71
71
"github.com/pingcap/tidb/util/expensivequery"
72
+ "github.com/pingcap/tidb/util/intest"
72
73
"github.com/pingcap/tidb/util/logutil"
73
74
"github.com/pingcap/tidb/util/memory"
74
75
"github.com/pingcap/tidb/util/memoryusagealarm"
@@ -905,7 +906,12 @@ func (do *Domain) Close() {
905
906
ttlJobManager := do .ttlJobManager .Load ()
906
907
if ttlJobManager != nil {
907
908
ttlJobManager .Stop ()
908
- err := ttlJobManager .WaitStopped (context .Background (), 30 * time .Second )
909
+ err := ttlJobManager .WaitStopped (context .Background (), func () time.Duration {
910
+ if intest .InTest {
911
+ return 10 * time .Second
912
+ }
913
+ return 30 * time .Second
914
+ }())
909
915
if err != nil {
910
916
logutil .BgLogger ().Warn ("fail to wait until the ttl job manager stop" , zap .Error (err ))
911
917
}
You can’t perform that action at this time.
0 commit comments