@ -648,15 +648,13 @@ func TestScrapeLoopSeriesAdded(t *testing.T) {
s := teststorage . New ( t )
s := teststorage . New ( t )
defer s . Close ( )
defer s . Close ( )
app := s . Appender ( )
ctx , cancel := context . WithCancel ( context . Background ( ) )
ctx , cancel := context . WithCancel ( context . Background ( ) )
sl := newScrapeLoop ( ctx ,
sl := newScrapeLoop ( ctx ,
& testScraper { } ,
& testScraper { } ,
nil , nil ,
nil , nil ,
nopMutator ,
nopMutator ,
nopMutator ,
nopMutator ,
func ( ) s torage . Appender { return app } ,
s . Appender ,
nil ,
nil ,
0 ,
0 ,
true ,
true ,
@ -793,13 +791,11 @@ func TestScrapeLoopCache(t *testing.T) {
s := teststorage . New ( t )
s := teststorage . New ( t )
defer s . Close ( )
defer s . Close ( )
sapp := s . Appender ( )
appender := & collectResultAppender { }
appender := & collectResultAppender { next : sapp }
var (
var (
signal = make ( chan struct { } , 1 )
signal = make ( chan struct { } , 1 )
scraper = & testScraper { }
scraper = & testScraper { }
app = func ( ) storage . Appender { return appender }
app = func ( ) storage . Appender { appender . next = s . Appender ( ) ; return appender }
)
)
ctx , cancel := context . WithCancel ( context . Background ( ) )
ctx , cancel := context . WithCancel ( context . Background ( ) )
@ -1141,15 +1137,13 @@ func TestScrapeLoop_ChangingMetricString(t *testing.T) {
s := teststorage . New ( t )
s := teststorage . New ( t )
defer s . Close ( )
defer s . Close ( )
app := s . Appender ( )
capp := & collectResultAppender { }
capp := & collectResultAppender { next : app }
sl := newScrapeLoop ( context . Background ( ) ,
sl := newScrapeLoop ( context . Background ( ) ,
nil , nil , nil ,
nil , nil , nil ,
nopMutator ,
nopMutator ,
nopMutator ,
nopMutator ,
func ( ) storage . Appender { return capp } ,
func ( ) storage . Appender { capp . next = s . Appender ( ) ; return capp } ,
nil ,
nil ,
0 ,
0 ,
true ,
true ,
@ -1628,15 +1622,13 @@ func TestScrapeLoopDiscardDuplicateLabels(t *testing.T) {
s := teststorage . New ( t )
s := teststorage . New ( t )
defer s . Close ( )
defer s . Close ( )
app := s . Appender ( )
ctx , cancel := context . WithCancel ( context . Background ( ) )
ctx , cancel := context . WithCancel ( context . Background ( ) )
sl := newScrapeLoop ( ctx ,
sl := newScrapeLoop ( ctx ,
& testScraper { } ,
& testScraper { } ,
nil , nil ,
nil , nil ,
nopMutator ,
nopMutator ,
nopMutator ,
nopMutator ,
func ( ) s torage . Appender { return app } ,
s . Appender ,
nil ,
nil ,
0 ,
0 ,
true ,
true ,
@ -1896,15 +1888,13 @@ func TestScrapeAddFast(t *testing.T) {
s := teststorage . New ( t )
s := teststorage . New ( t )
defer s . Close ( )
defer s . Close ( )
app := s . Appender ( )
ctx , cancel := context . WithCancel ( context . Background ( ) )
ctx , cancel := context . WithCancel ( context . Background ( ) )
sl := newScrapeLoop ( ctx ,
sl := newScrapeLoop ( ctx ,
& testScraper { } ,
& testScraper { } ,
nil , nil ,
nil , nil ,
nopMutator ,
nopMutator ,
nopMutator ,
nopMutator ,
func ( ) s torage . Appender { return app } ,
s . Appender ,
nil ,
nil ,
0 ,
0 ,
true ,
true ,