Kaynağa Gözat

test(updater): raise apply wait deadline from 5s to 30s under -race (#260)

The apply runs git clone/fetch/merge; 5s is too tight on a loaded CI box
with the race detector, making TestApplyYaEnCursoYScript and
TestHistoryFailedOnApplyError flaky (#259).

Co-authored-by: gnacho <hnacho@proton.me>
Nacho 3 ay önce
ebeveyn
işleme
92cd333830

+ 1 - 1
server-go/internal/updater/updater_helpers_test.go

@@ -41,7 +41,7 @@ func writeSlowScript(t *testing.T, root string) {
 // waitDone espera a que el update acabe (updating false o step done).
 func waitDone(t *testing.T, u *Updater) {
 	t.Helper()
-	deadline := time.Now().Add(5 * time.Second)
+	deadline := time.Now().Add(30 * time.Second)
 	for {
 		st := u.Status()
 		if m, ok := st.Updating.(progress); ok && m.Step == "done" {

+ 1 - 1
server-go/internal/updater/updater_test.go

@@ -153,7 +153,7 @@ func TestApplyYaEnCursoYScript(t *testing.T) {
 	if u.Apply() {
 		t.Fatal("apply duplicado debería ser false")
 	}
-	deadline := time.Now().Add(5 * time.Second)
+	deadline := time.Now().Add(30 * time.Second)
 	for {
 		st := u.Status()
 		if m, ok := st.Updating.(progress); ok && m.Step == "done" {