test: increase test times to try to avoid clang error
This commit is contained in:
@@ -213,7 +213,8 @@ func main() {
|
|||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
var testErr error
|
var testErr error
|
||||||
for attempt := 0; attempt < 2; attempt++ {
|
const maxAttempts = 4
|
||||||
|
for attempt := 1; attempt <= maxAttempts; attempt++ {
|
||||||
testErr = func() error {
|
testErr = func() error {
|
||||||
// Create a new test directory for each test case
|
// Create a new test directory for each test case
|
||||||
tmpDir := setupTestProject(t)
|
tmpDir := setupTestProject(t)
|
||||||
@@ -285,8 +286,8 @@ func main() {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
if attempt == 0 {
|
if attempt < maxAttempts {
|
||||||
t.Logf("Test failed on first attempt: %v. Retrying...", testErr)
|
t.Logf("Test failed on attempt %v/%v: %v. Retrying...", testErr, attempt, maxAttempts)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user