diff --git a/app/plugins/contactRetry_test.go b/app/plugins/contactRetry_test.go index be60309..ab55a98 100644 --- a/app/plugins/contactRetry_test.go +++ b/app/plugins/contactRetry_test.go @@ -33,12 +33,13 @@ func TestContactRetryQueue(t *testing.T) { // This is the worst part of this test setup. Ideally we would sleep, or some other yielding, but // go test scheduling doesn't like that and even sleeping long periods won't cause the event thread to make // progress... - for { + setup := false; + for !setup { if pinf, exists := cr.connections.Load(testOnion); exists { if pinf.(*contact).queued { if _, exists := cr.authorizedPeers.Load(testOnion); exists { t.Logf("authorized") - break + setup = true; } } }