Very close to LGTM, but I'd like to see more testing of the error paths. What happens when zookeeper goes down, for example? And I'm still unhappy about the non-thread-safe access to firewaller variables in the tests.
https://codereview.appspot.com/6374069/diff/12001/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right):
https://codereview.appspot.com/6374069/diff/12001/worker/firewaller/firewaller.go#newcode145 worker/firewaller/firewaller.go:145: // Had been an error, so end the loop. // The watcher terminated prematurely, so end the loop.
https://codereview.appspot.com/6374069/diff/12001/worker/firewaller/firewaller_test.go File worker/firewaller/firewaller_test.go (right):
https://codereview.appspot.com/6374069/diff/12001/worker/firewaller/firewaller_test.go#newcode81 worker/firewaller/firewaller_test.go:81: c.Assert(addedMachines, DeepEquals, allMachines) c.Assert(allMachines, DeepEquals, addedMachines)
https://codereview.appspot.com/6374069/diff/12001/worker/firewaller/firewaller_test.go#newcode91 worker/firewaller/firewaller_test.go:91: c.Assert(addedMachines, DeepEquals, allMachines) c.Assert(allMachines, DeepEquals, addedMachines)
https://codereview.appspot.com/6374069/
« Back to merge proposal
Very close to LGTM, but I'd like to see more testing of the error paths.
What happens when zookeeper goes down, for example?
And I'm still unhappy about the non-thread-safe access to firewaller
variables in the tests.
https:/ /codereview. appspot. com/6374069/ diff/12001/ worker/ firewaller/ firewaller. go firewaller/ firewaller. go (right):
File worker/
https:/ /codereview. appspot. com/6374069/ diff/12001/ worker/ firewaller/ firewaller. go#newcode145 firewaller/ firewaller. go:145: // Had been an error, so end the
worker/
loop.
// The watcher terminated prematurely, so end the loop.
https:/ /codereview. appspot. com/6374069/ diff/12001/ worker/ firewaller/ firewaller_ test.go firewaller/ firewaller_ test.go (right):
File worker/
https:/ /codereview. appspot. com/6374069/ diff/12001/ worker/ firewaller/ firewaller_ test.go# newcode81 firewaller/ firewaller_ test.go: 81: c.Assert( addedMachines, allMachines, DeepEquals, addedMachines)
worker/
DeepEquals, allMachines)
c.Assert(
https:/ /codereview. appspot. com/6374069/ diff/12001/ worker/ firewaller/ firewaller_ test.go# newcode91 firewaller/ firewaller_ test.go: 91: c.Assert( addedMachines, allMachines, DeepEquals, addedMachines)
worker/
DeepEquals, allMachines)
c.Assert(
https:/ /codereview. appspot. com/6374069/