From 29c9a975561e2ac06bd15dfb987e60c45af835af Mon Sep 17 00:00:00 2001 From: Fenny <25108519+Fenny@users.noreply.github.com> Date: Sat, 18 Jul 2020 01:11:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Update=20IPv6=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prefork_test.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/prefork_test.go b/prefork_test.go index 078d3624..f7a1a705 100644 --- a/prefork_test.go +++ b/prefork_test.go @@ -4,6 +4,7 @@ import ( "crypto/tls" "io/ioutil" "os" + "strings" "testing" "time" @@ -67,11 +68,14 @@ func Test_App_Prefork_TCP6_Addr(t *testing.T) { app.Settings.DisableStartupMessage = true app.init() - utils.AssertEqual(t, "listen: tcp6 is not supported when prefork is enabled", app.Listen("[::1]:3000").Error()) - app.Settings.Network = "tcp6" - app.init() - utils.AssertEqual(t, "listen: tcp6 is not supported when prefork is enabled", app.Listen(":3000").Error()) + go func() { + time.Sleep(1000 * time.Millisecond) + utils.AssertEqual(t, nil, app.Shutdown()) + }() + + err := app.Listen("[::1]:3200") + utils.AssertEqual(t, true, strings.Contains(err.Error(), "exit status")) } func Test_App_Prefork_Child_Process_Never_Show_Startup_Message(t *testing.T) {