resources: Do not panic on autogrouped graph switches

Graph changes from autogrouped -> not autogrouped or vice versa cause a
panic (or I assume a leak) because we compared the auto grouped graph to
the ungrouped one, which would cause an Exit on an unstarted Vertex.
This includes a test that seems to reliably reproduces the issue.
This commit is contained in:
James Shubin
2017-06-07 04:45:25 -04:00
parent 525cd54921
commit 9f5057eac7
6 changed files with 228 additions and 6 deletions

10
test/shell/libmgmt-change2.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash -e
go build -i -o libmgmt libmgmt-change2.go
# this example should change graphs frequently, and then shutdown...
$timeout --kill-after=30s 20s ./libmgmt &
pid=$!
wait $pid # get exit status
e=$?
rm libmgmt # cleanup build artefact
exit $e