修复迁移请求排空取消处理
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-06 06:38:40 +08:00
1 parent 7e52a01d3d
commit d35f74355f
3 files changed
+14 -7

No files matched your search

@@ -50,7 +50,11 @@ func TestMaintenanceGuardDrainsRequestsAndKeepsRestartRoute(t *testing.T) {
close(entered)
<-release
case "/api/v1/database/migrations":
release := service.drainRequests(r.Context())
release, err := service.drainRequests(r.Context())
if err != nil {
http.Error(w, err.Error(), http.StatusRequestTimeout)
return
}
defer release()
executor.paused.Store(true)
close(migrated)