@@ -295,7 +295,7 @@ func TestSleepInterval(t *testing.T) {
295295 // Call run() - this should sleep `sleepLen` per destination address
296296 // After it returns, we expect (sleepLen * number of destinations) seconds has
297297 // elapsed
298- err := m .run ()
298+ err := m .run (context . Background () )
299299 test .AssertNotError (t , err , "error calling mailer run()" )
300300 expectedEnd := clock .NewFake ()
301301 expectedEnd .Add (time .Second * time .Duration (sleepLen * len (recipients )))
@@ -315,7 +315,7 @@ func TestSleepInterval(t *testing.T) {
315315
316316 // Call run() - this should blast through all destinations without sleep
317317 // After it returns, we expect no clock time to have elapsed on the fake clock
318- err = m .run ()
318+ err = m .run (context . Background () )
319319 test .AssertNotError (t , err , "error calling mailer run()" )
320320 expectedEnd = clock .NewFake ()
321321 test .AssertEquals (t , m .clk .Now (), expectedEnd .Now ())
@@ -346,7 +346,7 @@ func TestMailIntervals(t *testing.T) {
346346
347347 // Run the mailer. It should produce an error about the interval start
348348 mc .Clear ()
349- err := m .run ()
349+ err := m .run (context . Background () )
350350 test .AssertError (t , err , "expected error" )
351351 test .AssertEquals (t , len (mc .Messages ), 0 )
352352
@@ -365,7 +365,7 @@ func TestMailIntervals(t *testing.T) {
365365
366366 // Run the mailer. It should produce an error about the sleep interval
367367 mc .Clear ()
368- err = m .run ()
368+ err = m .run (context . Background () )
369369 test .AssertEquals (t , len (mc .Messages ), 0 )
370370 test .AssertEquals (t , err .Error (), "sleep interval (-10) is < 0" )
371371
@@ -387,7 +387,7 @@ func TestMailIntervals(t *testing.T) {
387387 // [email protected] (beginning of the range), 388388389389 mc .Clear ()
390- err = m .run ()
390+ err = m .run (context . Background () )
391391 test .AssertNotError (t , err , "run() produced an error" )
392392 test .AssertEquals (t , len (mc .Messages ), 2 )
393393 test .AssertEquals (t , mocks.MailerMessage {
@@ -418,7 +418,7 @@ func TestMailIntervals(t *testing.T) {
418418 // Run the mailer. Two messages should have been produced, one to
419419420420 mc .Clear ()
421- err = m .run ()
421+ err = m .run (context . Background () )
422422 test .AssertNotError (t , err , "run() produced an error" )
423423 test .AssertEquals (t , len (mc .Messages ), 2 )
424424 test .AssertEquals (t , mocks.MailerMessage {
@@ -457,7 +457,7 @@ func TestParallelism(t *testing.T) {
457457 }
458458
459459 mc .Clear ()
460- err := m .run ()
460+ err := m .run (context . Background () )
461461 test .AssertNotError (t , err , "run() produced an error" )
462462
463463 // The fake clock should have advanced 9 seconds, one for each parallel
@@ -500,7 +500,7 @@ func TestMessageContentStatic(t *testing.T) {
500500
501501 // Run the mailer, one message should have been created with the content
502502 // expected
503- err := m .run ()
503+ err := m .run (context . Background () )
504504 test .AssertNotError (t , err , "error calling mailer run()" )
505505 test .AssertEquals (t , len (mc .Messages ), 1 )
506506 test .AssertEquals (t , mocks.MailerMessage {
0 commit comments