improved connection loop

This commit is contained in:
Juan Leni
2019-04-03 14:15:50 +02:00
parent 409175c3f2
commit 37cc8db430
4 changed files with 93 additions and 38 deletions
@@ -144,7 +144,7 @@ func (th *TestHarness) Run() {
for acceptRetries := th.acceptRetries; acceptRetries > 0; acceptRetries-- {
th.logger.Info("Attempting to accept incoming connection", "acceptRetries", acceptRetries)
if err := th.signerClient.WaitForConnection(5 * time.Second); err != nil {
if err := th.signerClient.WaitForConnection(2 * time.Second); err != nil {
// if it wasn't a timeout error
if _, ok := err.(timeoutError); !ok {
th.logger.Error("Failed to start listener", "err", err)
@@ -73,7 +73,7 @@ const (
)
func TestRemoteSignerTestHarnessMaxAcceptRetriesReached(t *testing.T) {
cfg := makeConfig(t, 100, 2)
cfg := makeConfig(t, 200, 2)
defer cleanup(cfg)
th, err := NewTestHarness(log.TestingLogger(), cfg)