summaryrefslogtreecommitdiff
path: root/pkg
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
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')
-rw-r--r--pkg/transport/socket/socket_factory_spawn_test.go14
-rwxr-xr-xpkg/transport/socket/socket_factory_test.go20
2 files changed, 17 insertions, 17 deletions
diff --git a/pkg/transport/socket/socket_factory_spawn_test.go b/pkg/transport/socket/socket_factory_spawn_test.go
index 23506291..905a3b6b 100644
--- a/pkg/transport/socket/socket_factory_spawn_test.go
+++ b/pkg/transport/socket/socket_factory_spawn_test.go
@@ -16,7 +16,7 @@ import (
)
func Test_Tcp_Start2(t *testing.T) {
- 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()
@@ -45,7 +45,7 @@ func Test_Tcp_Start2(t *testing.T) {
}
func Test_Tcp_StartCloseFactory2(t *testing.T) {
- 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")
@@ -72,7 +72,7 @@ func Test_Tcp_StartCloseFactory2(t *testing.T) {
}
func Test_Tcp_StartError2(t *testing.T) {
- 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()
@@ -96,7 +96,7 @@ func Test_Tcp_StartError2(t *testing.T) {
}
func Test_Tcp_Failboot2(t *testing.T) {
- 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()
@@ -128,7 +128,7 @@ func Test_Tcp_Failboot2(t *testing.T) {
}
func Test_Tcp_Invalid2(t *testing.T) {
- 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()
@@ -148,7 +148,7 @@ func Test_Tcp_Invalid2(t *testing.T) {
}
func Test_Tcp_Broken2(t *testing.T) {
- 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()
@@ -202,7 +202,7 @@ func Test_Tcp_Broken2(t *testing.T) {
}
func Test_Tcp_Echo2(t *testing.T) {
- 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()
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()