diff --git a/tests/ci/cmd_test.go b/tests/ci/cmd_test.go index ea76e6d..44f2e9e 100644 --- a/tests/ci/cmd_test.go +++ b/tests/ci/cmd_test.go @@ -19,7 +19,7 @@ func TestCmdTcp(t *testing.T) { if assert.NoError(err) { defer s.Stop() } - time.Sleep(100 * time.Millisecond) + time.Sleep(200 * time.Millisecond) c := util.NewProcess(consts.FRPC_BIN_PATH, []string{"tcp", "-s", "127.0.0.1:20000", "-t", "123", "-u", "test", "-l", "10701", "-r", "20801", "-n", "tcp_test"}) @@ -27,7 +27,7 @@ func TestCmdTcp(t *testing.T) { if assert.NoError(err) { defer c.Stop() } - time.Sleep(250 * time.Millisecond) + time.Sleep(500 * time.Millisecond) res, err := util.SendTcpMsg("127.0.0.1:20801", consts.TEST_TCP_ECHO_STR) assert.NoError(err) @@ -43,7 +43,7 @@ func TestCmdUdp(t *testing.T) { if assert.NoError(err) { defer s.Stop() } - time.Sleep(100 * time.Millisecond) + time.Sleep(200 * time.Millisecond) c := util.NewProcess(consts.FRPC_BIN_PATH, []string{"udp", "-s", "127.0.0.1:20000", "-t", "123", "-u", "test", "-l", "10702", "-r", "20802", "-n", "udp_test"}) @@ -51,7 +51,7 @@ func TestCmdUdp(t *testing.T) { if assert.NoError(err) { defer c.Stop() } - time.Sleep(250 * time.Millisecond) + time.Sleep(500 * time.Millisecond) res, err := util.SendUdpMsg("127.0.0.1:20802", consts.TEST_UDP_ECHO_STR) assert.NoError(err) @@ -67,7 +67,7 @@ func TestCmdHttp(t *testing.T) { if assert.NoError(err) { defer s.Stop() } - time.Sleep(100 * time.Millisecond) + time.Sleep(200 * time.Millisecond) c := util.NewProcess(consts.FRPC_BIN_PATH, []string{"http", "-s", "127.0.0.1:20000", "-t", "123", "-u", "test", "-n", "udp_test", "-l", "10704", "--custom_domain", "127.0.0.1"}) @@ -75,7 +75,7 @@ func TestCmdHttp(t *testing.T) { if assert.NoError(err) { defer c.Stop() } - time.Sleep(250 * time.Millisecond) + time.Sleep(500 * time.Millisecond) code, body, _, err := util.SendHttpMsg("GET", "http://127.0.0.1:20001", "", nil, "") if assert.NoError(err) { diff --git a/tests/ci/reconnect_test.go b/tests/ci/reconnect_test.go index 114567b..9fe53b5 100644 --- a/tests/ci/reconnect_test.go +++ b/tests/ci/reconnect_test.go @@ -56,14 +56,14 @@ func TestReconnect(t *testing.T) { defer frpsProcess.Stop() } - time.Sleep(100 * time.Millisecond) + time.Sleep(200 * time.Millisecond) frpcProcess := util.NewProcess(consts.FRPC_BIN_PATH, []string{"-c", frpcCfgPath}) err = frpcProcess.Start() if assert.NoError(err) { defer frpcProcess.Stop() } - time.Sleep(250 * time.Millisecond) + time.Sleep(500 * time.Millisecond) // test tcp res, err := util.SendTcpMsg("127.0.0.1:20801", consts.TEST_TCP_ECHO_STR) @@ -72,7 +72,7 @@ func TestReconnect(t *testing.T) { // stop frpc frpcProcess.Stop() - time.Sleep(100 * time.Millisecond) + time.Sleep(200 * time.Millisecond) // test tcp, expect failed _, err = util.SendTcpMsg("127.0.0.1:20801", consts.TEST_TCP_ECHO_STR) @@ -84,7 +84,7 @@ func TestReconnect(t *testing.T) { if assert.NoError(err) { defer newFrpcProcess.Stop() } - time.Sleep(250 * time.Millisecond) + time.Sleep(500 * time.Millisecond) // test tcp res, err = util.SendTcpMsg("127.0.0.1:20801", consts.TEST_TCP_ECHO_STR) @@ -93,7 +93,7 @@ func TestReconnect(t *testing.T) { // stop frps frpsProcess.Stop() - time.Sleep(100 * time.Millisecond) + time.Sleep(200 * time.Millisecond) // test tcp, expect failed _, err = util.SendTcpMsg("127.0.0.1:20801", consts.TEST_TCP_ECHO_STR) diff --git a/tests/ci/reload_test.go b/tests/ci/reload_test.go index f05f2ed..4c5b4d4 100644 --- a/tests/ci/reload_test.go +++ b/tests/ci/reload_test.go @@ -94,7 +94,7 @@ func TestReload(t *testing.T) { defer frpsProcess.Stop() } - time.Sleep(100 * time.Millisecond) + time.Sleep(200 * time.Millisecond) frpcProcess := util.NewProcess(consts.FRPC_BIN_PATH, []string{"-c", frpcCfgPath}) err = frpcProcess.Start() @@ -102,7 +102,7 @@ func TestReload(t *testing.T) { defer frpcProcess.Stop() } - time.Sleep(250 * time.Millisecond) + time.Sleep(500 * time.Millisecond) // test tcp1 res, err := util.SendTcpMsg("127.0.0.1:20801", consts.TEST_TCP_ECHO_STR) diff --git a/tests/ci/template_test.go b/tests/ci/template_test.go index 09b8417..1e30af5 100644 --- a/tests/ci/template_test.go +++ b/tests/ci/template_test.go @@ -55,7 +55,7 @@ func TestConfTemplate(t *testing.T) { defer frpsProcess.Stop() } - time.Sleep(100 * time.Millisecond) + time.Sleep(200 * time.Millisecond) frpcProcess := util.NewProcess("env", []string{"FRP_TOKEN=123456", "TCP_REMOTE_PORT=20801", consts.FRPC_BIN_PATH, "-c", frpcCfgPath}) err = frpcProcess.Start() @@ -63,7 +63,7 @@ func TestConfTemplate(t *testing.T) { defer frpcProcess.Stop() } - time.Sleep(250 * time.Millisecond) + time.Sleep(500 * time.Millisecond) // test tcp1 res, err := util.SendTcpMsg("127.0.0.1:20801", consts.TEST_TCP_ECHO_STR) diff --git a/tests/ci/tls_test.go b/tests/ci/tls_test.go index 2f13eb3..d2ad801 100644 --- a/tests/ci/tls_test.go +++ b/tests/ci/tls_test.go @@ -55,14 +55,14 @@ func TestTlsOverTCP(t *testing.T) { defer frpsProcess.Stop() } - time.Sleep(100 * time.Millisecond) + time.Sleep(200 * time.Millisecond) frpcProcess := util.NewProcess(consts.FRPC_BIN_PATH, []string{"-c", frpcCfgPath}) err = frpcProcess.Start() if assert.NoError(err) { defer frpcProcess.Stop() } - time.Sleep(250 * time.Millisecond) + time.Sleep(500 * time.Millisecond) // test tcp res, err := util.SendTcpMsg("127.0.0.1:20801", consts.TEST_TCP_ECHO_STR)