public void ConnectionShouldAttemptMultipleTimesWhenConnectionFails()
{
var count = 0;
using (var test = new KafkaTcpSocket(new DefaultTraceLog(), _badServerUrl))
{
test.WriteAsync(1.ToBytes().ToPayload()); //will force a connection
test.OnReconnectionAttempt += x => Interlocked.Increment(ref count);
TaskTest.WaitFor(() => count > 1, 10000);
Assert.That(count, Is.GreaterThan(1));
}
}