File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed
cmd/otel-allocator/internal Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -190,9 +190,9 @@ func Test_runWatch(t *testing.T) {
190190 mapMutex .Lock ()
191191 defer mapMutex .Unlock ()
192192 assert .Len (collect , actual , len (tt .want ))
193- assert .Equal (collect , actual , tt .want )
193+ assert .Equal (collect , tt .want , actual )
194194 assert .Equal (collect , testutil .ToFloat64 (collectorsDiscovered ), float64 (len (actual )))
195- }, time .Second * 3 , time .Millisecond )
195+ }, time .Second * 30 , time .Millisecond * 100 )
196196 })
197197 }
198198}
Original file line number Diff line number Diff line change @@ -1068,16 +1068,13 @@ func TestNamespaceLabelUpdate(t *testing.T) {
10681068 },
10691069 }})
10701070
1071- select {
1072- case <- events :
1073- case <- time .After (1 * time .Minute ):
1074- }
1075-
1076- got , err = w .LoadConfig (context .Background ())
1077- assert .NoError (t , err )
1071+ assert .EventuallyWithT (t , func (collect * assert.CollectT ) {
1072+ got , err = w .LoadConfig (context .Background ())
1073+ assert .NoError (t , err )
10781074
1079- sanitizeScrapeConfigsForTest (got .ScrapeConfigs )
1080- assert .Equal (t , want_after .ScrapeConfigs , got .ScrapeConfigs )
1075+ sanitizeScrapeConfigsForTest (got .ScrapeConfigs )
1076+ assert .Equal (t , want_after .ScrapeConfigs , got .ScrapeConfigs )
1077+ }, time .Second * 30 , time .Millisecond * 100 )
10811078}
10821079
10831080func TestRateLimit (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments