In the successfull case, we start the timer with NewTimer(0), then do a
bunch of stuff during which time it can fire, then reset it with
Reset(0). The result is that two timer firings are queued when we enter
the select loop, so we do two announcements back to back and fail the
tests.
- Bug fix - use .Errorf() instead of .Error():
Before this change, an error message for failed tests in files/set_test.go
wrongly tried to use format strings in a call to .Error()
- Change event constants to be of type EventType rather than untyped integers.
- Slightly relax the locking for registry cache lookups:
For read access to Discover.registry we only need to take a read lock.
- Some cosmetic fixes.