updated the sd tests

This commit is contained in:
Krasi Georgiev 2018-01-26 13:31:59 +00:00
parent acc4197098
commit 818dda72db
1 changed files with 3 additions and 3 deletions

View File

@ -655,7 +655,7 @@ func TestTargetUpdatesOrder(t *testing.T) {
for testIndex, testCase := range testCases { for testIndex, testCase := range testCases {
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
defer cancel() defer cancel()
discoveryManager := NewManager(nil) discoveryManager := NewManager(ctx, nil)
var totalUpdatesCount int var totalUpdatesCount int
@ -741,8 +741,8 @@ scrape_configs:
} }
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
defer cancel() defer cancel()
discoveryManager := NewManager(nil) discoveryManager := NewManager(ctx, nil)
go discoveryManager.Run(ctx) go discoveryManager.Run()
c := make(map[string]sd_config.ServiceDiscoveryConfig) c := make(map[string]sd_config.ServiceDiscoveryConfig)
for _, v := range cfg.ScrapeConfigs { for _, v := range cfg.ScrapeConfigs {