Let's try to use passive loopback ip addresses in TestEmail_SendFailedMakeClient test for TLS Sender.
127.0.0.2 instead of 127.0.0.1
This is a general way to receive timeout network error.
/usr/local/bin/go test -timeout 30s -run ^TestEmail_SendFailedMakeClient$ github.com/go-pkgz/email
The test will fail with panic message panic: test timed out after 30s. Whereas we expect to receive timeout network error cuz Sender timeout was set to 200ms TimeOut(time.Millisecond*200).
Let's try to use passive loopback ip addresses in
TestEmail_SendFailedMakeClient
test for TLS Sender. 127.0.0.2 instead of 127.0.0.1 This is a general way to receive timeout network error.Run this test:
The test will fail with panic message
panic: test timed out after 30s
. Whereas we expect to receive timeout network error cuz Sender timeout was set to 200msTimeOut(time.Millisecond*200)
.