Have a method that do service URL discovery with custom timeout.

 so that the timeout can be provided. This avoids test failure on slow machine.