16723: Fix double-container-running bug in test stub.
authorTom Clegg <tom@tomclegg.ca>
Fri, 21 Aug 2020 14:38:25 +0000 (10:38 -0400)
committerTom Clegg <tom@tomclegg.ca>
Fri, 21 Aug 2020 14:38:25 +0000 (10:38 -0400)
commitd3fbb6b33a5b4a55dda969c7e7360cc31e1de0f6
tree8e7da60e639955fa9f885e3fa9c92d4b1fe0e520
parentf6d0a07763cbffee6a03864d20b8d753b9aefb82
16723: Fix double-container-running bug in test stub.

Two parts:

1. Update state to Complete before crunch-run exits, not after.

2. Don't call the "crashed while running" hook from the test stub
unless changing state to Running actually succeeded.

Also, call the "crashed while running" hook from the test stub if
changing state from Running to Complete fails.

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>
lib/dispatchcloud/test/stub_driver.go