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

View File

@@ -13,7 +13,8 @@ function run-test()
ROOT=$(dirname "${BASH_SOURCE}")/..
cd "${ROOT}"
for pkg in `go list ./... | grep -v 'vendor/' | grep -v 'examples/' | grep -v 'old/' | grep -v 'tmp/'`; do
base=$(go list .)
for pkg in `go list ./... | grep -v "^${base}/vendor/" | grep -v "^${base}/examples/" | grep -v "^${base}/test/" | grep -v "^${base}/old/" | grep -v "^${base}/tmp/"`; do
echo "Testing: $pkg"
# FIXME: can we capture and output the stderr from these tests too?
run-test go test "$pkg"