Merge branch '10700-dispatch'
[arvados.git] / services / crunch-dispatch-slurm / crunch-dispatch-slurm_test.go
index 86844dc61c09545561b10c4df27f42df03149016..8809e7bcc6fc10847ab84da1270387c6c9eb3dd3 100644 (file)
@@ -147,8 +147,8 @@ func (s *TestSuite) integrationTest(c *C,
        theConfig.CrunchRunCommand = []string{"echo"}
 
        dispatcher := dispatch.Dispatcher{
-               Arv:          arv,
-               PollInterval: time.Duration(1) * time.Second,
+               Arv:        arv,
+               PollPeriod: time.Duration(1) * time.Second,
                RunContainer: func(dispatcher *dispatch.Dispatcher,
                        container arvados.Container,
                        status chan arvados.Container) {
@@ -158,12 +158,12 @@ func (s *TestSuite) integrationTest(c *C,
                },
        }
 
-       squeueUpdater.StartMonitor(time.Duration(500) * time.Millisecond)
+       sqCheck = SqueueChecker{Period: 500 * time.Millisecond}
 
        err = dispatcher.Run()
        c.Assert(err, IsNil)
 
-       squeueUpdater.Done()
+       sqCheck.Stop()
 
        c.Check(sbatchCmdLine, DeepEquals, sbatchCmdComps)
 
@@ -208,8 +208,8 @@ func testWithServerStub(c *C, apiStubResponses map[string]arvadostest.StubRespon
        theConfig.CrunchRunCommand = []string{crunchCmd}
 
        dispatcher := dispatch.Dispatcher{
-               Arv:          arv,
-               PollInterval: time.Duration(1) * time.Second,
+               Arv:        arv,
+               PollPeriod: time.Duration(1) * time.Second,
                RunContainer: func(dispatcher *dispatch.Dispatcher,
                        container arvados.Container,
                        status chan arvados.Container) {