Bug #15953

lib/dispatchcloud/container IntegrationSuite.TestGetLockUnlockCancel is flaky

Added by Peter Amstutz 6 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Story points:
-
Release relationship:
Auto

Associated revisions

Revision 2544aab0 (diff)
Added by Tom Clegg 6 months ago

Fix variable unintentionally shared by multiple goroutines in test.

fixes #15953

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <>

History

#1 Updated by Tom Clegg 6 months ago

  • Assigned To set to Tom Clegg
  • Status changed from New to In Progress

https://ci.arvados.org/job/run-tests-remainder/3300/console

======= test lib/dispatchcloud/container
time="2019-12-30T18:45:15Z" level=warning msg="cancel container with no suitable instance type" ContainerUUID=zzzzz-dz642-queuedcontainer error="no suitable instance type" 
time="2019-12-30T18:45:15Z" level=warning msg="cancel container with no suitable instance type" ContainerUUID=zzzzz-dz642-queuedcontainer error="no suitable instance type" 
time="2019-12-30T18:45:16Z" level=warning msg="lock failed" ContainerUUID=zzzzz-dz642-queuedcontainer error="request failed: https://0.0.0.0:49831/arvados/v1/containers/zzzzz-dz642-queuedcontainer/lock: 422 Unprocessable Entity: #<ArvadosModel::LockFailedError: cannot lock when Locked> (req-ibdldy83xhmx1hbvxmbz)" 
time="2019-12-30T18:45:16Z" level=warning msg="cancel container with no suitable instance type" ContainerUUID=zzzzz-dz642-queuedcontainer error="no suitable instance type" 
time="2019-12-30T18:45:16Z" level=warning msg="cancel container with no suitable instance type" ContainerUUID=zzzzz-dz642-queuedcontainer error="no suitable instance type" 
time="2019-12-30T18:45:17Z" level=info msg="adding container to queue" ContainerUUID=zzzzz-dz642-queuedcontainer InstanceType=testType Priority=1 State=Queued

----------------------------------------------------------------------
FAIL: queue_test.go:42: IntegrationSuite.TestGetLockUnlockCancel

queue_test.go:77:
    c.Check(err, check.ErrorMatches, ".*cannot unlock when Queued.*")
... error string = "request failed: https://0.0.0.0:49831/arvados/v1/containers/zzzzz-dz642-queuedcontainer/unlock: 422 Unprocessable Entity: #<ArvadosModel::InvalidStateTransitionError: cannot unlock when Cancelled> (req-sx50xpgjn1n91kl93edi)" 
... regex string = ".*cannot unlock when Queued.*" 

queue_test.go:80:
    c.Check(err, check.IsNil)
... value *arvados.TransactionError = &arvados.TransactionError{Method:"POST", URL:url.URL{Scheme:"https", Opaque:"", User:(*url.Userinfo)(nil), Host:"0.0.0.0:49831", Path:"/arvados/v1/containers/zzzzz-dz642-queuedcontainer/lock", RawPath:"", ForceQuery:false, RawQuery:"", Fragment:""}, StatusCode:422, Status:"422 Unprocessable Entity", Errors:[]string{"#<ArvadosModel::LockFailedError: cannot lock when Cancelled> (req-xgy3oiceq18qom6mcjil)"}} ("request failed: https://0.0.0.0:49831/arvados/v1/containers/zzzzz-dz642-queuedcontainer/lock: 422 Unprocessable Entity: #<ArvadosModel::LockFailedError: cannot lock when Cancelled> (req-xgy3oiceq18qom6mcjil)")

queue_test.go:83:
    c.Check(ctr.State, check.Equals, arvados.ContainerStateLocked)
... obtained arvados.ContainerState = "Queued" 
... expected arvados.ContainerState = "Locked" 

queue_test.go:88:
    c.Check(err, check.IsNil)
... value *arvados.TransactionError = &arvados.TransactionError{Method:"POST", URL:url.URL{Scheme:"https", Opaque:"", User:(*url.Userinfo)(nil), Host:"0.0.0.0:49831", Path:"/arvados/v1/containers/zzzzz-dz642-queuedcontainer/unlock", RawPath:"", ForceQuery:false, RawQuery:"", Fragment:""}, StatusCode:422, Status:"422 Unprocessable Entity", Errors:[]string{"#<ArvadosModel::InvalidStateTransitionError: cannot unlock when Cancelled> (req-pf5bgi3cj8nw1rmkuyjg)"}} ("request failed: https://0.0.0.0:49831/arvados/v1/containers/zzzzz-dz642-queuedcontainer/unlock: 422 Unprocessable Entity: #<ArvadosModel::InvalidStateTransitionError: cannot unlock when Cancelled> (req-pf5bgi3cj8nw1rmkuyjg)")

OOPS: 1 passed, 1 FAILED
--- FAIL: Test (3.12s)
FAIL
coverage: 65.3% of statements
FAIL    git.arvados.org/arvados.git/lib/dispatchcloud/container    3.121s
FAIL
======= lib/dispatchcloud/container tests -- FAILED
======= test lib/dispatchcloud/container -- 5s

#2 Updated by Anonymous 6 months ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved

#3 Updated by Peter Amstutz 6 months ago

  • Target version changed from 2020-01-15 Sprint to 2020-01-02 Sprint

#4 Updated by Peter Amstutz 6 months ago

  • Release set to 22

Also available in: Atom PDF