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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user