Bug #14828
closed[crunch-dispatch-cloud] Fix flaky test
100%
Description
https://ci.curoverse.com/job/developer-run-tests-remainder/1089/consoleFull
IntegrationSuite.TestGetLockUnlockCancel
13:32:33 queue_test.go:78: 13:32:33 c.Check(err, check.IsNil) 13:32:33 ... value *arvados.TransactionError = &arvados.TransactionError{Method:"POST", URL:url.URL{Scheme:"https", Opaque:"", User:(*url.Userinfo)(nil), Host:"0.0.0.0:37007", 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>"}} ("request failed: https://0.0.0.0:37007/arvados/v1/containers/zzzzz-dz642-queuedcontainer/lock: 422 Unprocessable Entity: #<ArvadosModel::LockFailedError: cannot lock when Cancelled>")
Updated by Tom Clegg almost 6 years ago
Looks like IntegrationSuite.TestCancelIfNoInstanceType returns while it still has a PUT /arvados/v1/containers/zzzzz-dz642-queuedcontainer
request in progress. If the PUT request runs after the /database/reset
request, its side effect (cancelling the container) leaks into IntegrationSuite.TestGetLockUnlockCancel and causes the failure.
Updated by Tom Clegg almost 6 years ago
The problem is that an unsatisfiable container with state=Queued gets cancelled twice.
Update → addEnt → func1 → Lock → apiUpdate → addEnt → func1 → Cancel → Cancel
The test exits after the first cancel succeeds, allowing the second cancel to happen later.
Updated by Tom Clegg almost 6 years ago
- Target version changed from 2019-02-13 Sprint to 2019-02-27 Sprint
Updated by Tom Clegg almost 6 years ago
14828-fix-flaky-test @ d3e1ff27ec14bcb8a7037cc72f54a6816efe5916 https://ci.curoverse.com/view/Developer/job/developer-run-tests/1067/
(#14845 caused build 1067 to fail)
Updated by Tom Clegg almost 6 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|43e8b1419491290d4df65b2ea9121910b7c766cd.