router: Fix race in test discoverdRegister helper

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>