Weekend fun with further optimisations.

This commit is contained in:
2025-09-13 23:42:02 +01:00
parent a31fd64112
commit 7457a901a9
48 changed files with 8726 additions and 3268 deletions
+16 -2
View File
@@ -1,16 +1,30 @@
package traefikoidc
import (
"fmt"
"os"
"testing"
"time"
)
func TestMain(m *testing.M) {
// Run tests
code := m.Run()
// Global cleanup after all tests
globalCleanup.CleanupAll()
// Global cleanup after all tests with timeout
done := make(chan struct{})
go func() {
globalCleanup.CleanupAll()
close(done)
}()
select {
case <-done:
// Cleanup completed
case <-time.After(10 * time.Second):
// Cleanup timed out
fmt.Fprintf(os.Stderr, "WARNING: Global cleanup timed out after 10 seconds\n")
}
os.Exit(code)
}