mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
`StartNode` runs a naked goroutine, so it's impossible to test against it in a way that will reliably produce contained test failures when assertions are hit on the `(*node).run` goroutine. This commit introduces a harness that we can use in tests to wrap this goroutine and allow it to defer errors to `*testing.T`. Note that tests of `Node` still need to be architected carefully since it's easy to produce a deadlock in them should things not go exactly as planned. Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
18 KiB
18 KiB