Closed jchadwick-buf closed 1 year ago
Currently, starting a resolve process just returns an `io.Closer`. It should instead return a value that also has a `ResolveNow()` method. We should probably rename `resolver.Resolver` to `resolver.Factory` and the new interface (with `Close() error` and `ResolveNow()` methods) can be called `resolver.Resolver`.
Resolver
toFactory
, and createResolver
interface for resolver processes.ResolveNow()
method.ResolveNow()
works. Note that this new test moves the resolver tests to using channels a la the healthchecker test. This is needed to avoid racy behavior, otherwise our refresh signal races with the timer being unblocked. If the refresh signal is not quick enough, the timer will remain blocked whenBlockUntilContext
is called and cause the test assertions to run too early. A channel elegantly solves this.