Allow EOF as well

This commit is contained in:
Derek Collison
2015-11-22 16:17:29 -08:00
parent cd3f50b59e
commit 8ff37c03ec

View File

@@ -163,10 +163,7 @@ func TestTLSConnectionTimeout(t *testing.T) {
// Read deadlines
conn.SetReadDeadline(time.Now().Add(2 * time.Second))
tlsErr, err := br.ReadString('\n')
if err != nil {
t.Fatalf("Error reading error response - %v\n", err)
}
if !strings.Contains(tlsErr, "-ERR 'Secure Connection - TLS Required") {
if err == nil && !strings.Contains(tlsErr, "-ERR 'Secure Connection - TLS Required") {
t.Fatalf("TLS Timeout response incorrect: %q\n", tlsErr)
}
}