summaryrefslogtreecommitdiff
path: root/pkg/transport/socket/socket_factory_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-08-11 11:45:24 +0300
committerValery Piashchynski <[email protected]>2021-08-11 11:45:24 +0300
commit3e2e9fbd9650c44d57a41a9dc702fe93aad2b77f (patch)
tree38f25c3c0679e8510b896d001d1b7dccf21c4bd8 /pkg/transport/socket/socket_factory_test.go
parentd449d9d5aec1eec6d494064299feb1551f88ffe2 (diff)
Replace all 'localhost' with '127.0.0.1'. Fix default configuration and
other small bugs. Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/transport/socket/socket_factory_test.go')
-rwxr-xr-xpkg/transport/socket/socket_factory_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/pkg/transport/socket/socket_factory_test.go b/pkg/transport/socket/socket_factory_test.go
index 91da595d..f9bb2178 100755
--- a/pkg/transport/socket/socket_factory_test.go
+++ b/pkg/transport/socket/socket_factory_test.go
@@ -19,7 +19,7 @@ func Test_Tcp_Start(t *testing.T) {
ctx := context.Background()
time.Sleep(time.Millisecond * 10) // to ensure free socket
- ls, err := net.Listen("tcp", "localhost:9007")
+ ls, err := net.Listen("tcp", "127.0.0.1:9007")
if assert.NoError(t, err) {
defer func() {
err = ls.Close()
@@ -50,7 +50,7 @@ func Test_Tcp_Start(t *testing.T) {
func Test_Tcp_StartCloseFactory(t *testing.T) {
time.Sleep(time.Millisecond * 10) // to ensure free socket
ctx := context.Background()
- ls, err := net.Listen("tcp", "localhost:9007")
+ ls, err := net.Listen("tcp", "127.0.0.1:9007")
if assert.NoError(t, err) {
} else {
t.Skip("socket is busy")
@@ -79,7 +79,7 @@ func Test_Tcp_StartCloseFactory(t *testing.T) {
func Test_Tcp_StartError(t *testing.T) {
time.Sleep(time.Millisecond * 10) // to ensure free socket
ctx := context.Background()
- ls, err := net.Listen("tcp", "localhost:9007")
+ ls, err := net.Listen("tcp", "127.0.0.1:9007")
if assert.NoError(t, err) {
defer func() {
err = ls.Close()
@@ -106,7 +106,7 @@ func Test_Tcp_Failboot(t *testing.T) {
time.Sleep(time.Millisecond * 10) // to ensure free socket
ctx := context.Background()
- ls, err := net.Listen("tcp", "localhost:9007")
+ ls, err := net.Listen("tcp", "127.0.0.1:9007")
if assert.NoError(t, err) {
defer func() {
err3 := ls.Close()
@@ -140,7 +140,7 @@ func Test_Tcp_Failboot(t *testing.T) {
func Test_Tcp_Timeout(t *testing.T) {
time.Sleep(time.Millisecond * 10) // to ensure free socket
ctx := context.Background()
- ls, err := net.Listen("tcp", "localhost:9007")
+ ls, err := net.Listen("tcp", "127.0.0.1:9007")
if assert.NoError(t, err) {
defer func() {
err = ls.Close()
@@ -163,7 +163,7 @@ func Test_Tcp_Timeout(t *testing.T) {
func Test_Tcp_Invalid(t *testing.T) {
time.Sleep(time.Millisecond * 10) // to ensure free socket
ctx := context.Background()
- ls, err := net.Listen("tcp", "localhost:9007")
+ ls, err := net.Listen("tcp", "127.0.0.1:9007")
if assert.NoError(t, err) {
defer func() {
err = ls.Close()
@@ -185,7 +185,7 @@ func Test_Tcp_Invalid(t *testing.T) {
func Test_Tcp_Broken(t *testing.T) {
time.Sleep(time.Millisecond * 10) // to ensure free socket
ctx := context.Background()
- ls, err := net.Listen("tcp", "localhost:9007")
+ ls, err := net.Listen("tcp", "127.0.0.1:9007")
if assert.NoError(t, err) {
defer func() {
errC := ls.Close()
@@ -241,7 +241,7 @@ func Test_Tcp_Broken(t *testing.T) {
func Test_Tcp_Echo(t *testing.T) {
time.Sleep(time.Millisecond * 10) // to ensure free socket
ctx := context.Background()
- ls, err := net.Listen("tcp", "localhost:9007")
+ ls, err := net.Listen("tcp", "127.0.0.1:9007")
if assert.NoError(t, err) {
defer func() {
err = ls.Close()
@@ -485,7 +485,7 @@ func Test_Unix_Echo(t *testing.T) {
func Benchmark_Tcp_SpawnWorker_Stop(b *testing.B) {
ctx := context.Background()
- ls, err := net.Listen("tcp", "localhost:9007")
+ ls, err := net.Listen("tcp", "127.0.0.1:9007")
if err == nil {
defer func() {
err = ls.Close()
@@ -518,7 +518,7 @@ func Benchmark_Tcp_SpawnWorker_Stop(b *testing.B) {
func Benchmark_Tcp_Worker_ExecEcho(b *testing.B) {
ctx := context.Background()
- ls, err := net.Listen("tcp", "localhost:9007")
+ ls, err := net.Listen("tcp", "127.0.0.1:9007")
if err == nil {
defer func() {
err = ls.Close()