Skip to content

Commit 941c5f7

Browse files
harakeishiclaude
andcommitted
ai/fix(test): remove flaky time.Since assertion in unified detector test
IsZero() check is sufficient to verify GeneratedAt is set. time.Since() with 1-second threshold could fail in slow CI environments. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent baf1e69 commit 941c5f7

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

internal/scanner/unified_detector_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package scanner
33
import (
44
"context"
55
"testing"
6-
"time"
76

87
"github.com/harakeishi/gopose/internal/testutil"
98
"github.com/harakeishi/gopose/pkg/types"
@@ -202,11 +201,6 @@ func TestDetectConflicts(t *testing.T) {
202201
if result.GeneratedAt.IsZero() {
203202
t.Error("DetectConflicts() GeneratedAt is zero, want non-zero")
204203
}
205-
206-
// verify GeneratedAt is within 1 second (accounting for processing time)
207-
if time.Since(result.GeneratedAt) > time.Second {
208-
t.Errorf("DetectConflicts() GeneratedAt = %v, too old", result.GeneratedAt)
209-
}
210204
})
211205
}
212206
}

0 commit comments

Comments
 (0)