1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
10 "git.arvados.org/arvados.git/sdk/go/arvados"
11 "git.arvados.org/arvados.git/sdk/go/arvadosclient"
12 "git.arvados.org/arvados.git/sdk/go/arvadostest"
16 // Gocheck boilerplate
17 var _ = Suite(&suite{})
21 func (s *suite) TestTrackContainer(c *C) {
22 arv, err := arvadosclient.MakeArvadosClient()
23 c.Assert(err, Equals, nil)
24 arv.ApiToken = arvadostest.Dispatch1Token
26 done := make(chan bool, 1)
27 time.AfterFunc(10*time.Second, func() { done <- false })
30 RunContainer: func(dsp *Dispatcher, ctr arvados.Container, status <-chan arvados.Container) error {
31 for ctr := range status {
38 d.TrackContainer(arvadostest.QueuedContainerUUID)
39 c.Assert(<-done, Equals, true)