Hackaton: Add more unit tests, take 4 (#101704)

* cloudmigration/cloudmigrationimpl: run integration tests in parallel

* tsdb/mysql: run tests with actual service and instance manager

* pluginsintegration/angulardetectorsprovider: reduce job interval in test

* util: extract test that should only be ran with -race enabled and unskip it
This commit is contained in:
Matheus Macabu
2025-03-07 14:06:47 +01:00
committed by GitHub
parent cc80681beb
commit 5917ed8227
7 changed files with 266 additions and 154 deletions
@@ -337,7 +337,7 @@ func TestDynamicAngularDetectorsProviderBackgroundService(t *testing.T) {
t.Run("background service", func(t *testing.T) {
oldBackgroundJobInterval := backgroundJobIntervalOnPrem
backgroundJobIntervalOnPrem = time.Millisecond * 500
backgroundJobIntervalOnPrem = 10 * time.Millisecond
t.Cleanup(func() {
backgroundJobIntervalOnPrem = oldBackgroundJobInterval
})
@@ -387,7 +387,7 @@ func TestDynamicAngularDetectorsProviderBackgroundService(t *testing.T) {
lastJobTime := time.Now()
var jobCalls counter
const jobInterval = time.Millisecond * 500
const jobInterval = time.Millisecond * 20
done := make(chan struct{})
gcom := newDefaultGCOMScenario(func(_ http.ResponseWriter, _ *http.Request) {
now := time.Now()