From 277d4a39af0bd47409ceabf6f4ded5c3e3fc925e Mon Sep 17 00:00:00 2001 From: kinggo Date: Mon, 27 May 2024 22:00:05 +0800 Subject: [PATCH] test: add assert --- pkg/app/server/hertz_unix_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/app/server/hertz_unix_test.go b/pkg/app/server/hertz_unix_test.go index 32fbd2ee5..1526fb3af 100644 --- a/pkg/app/server/hertz_unix_test.go +++ b/pkg/app/server/hertz_unix_test.go @@ -156,6 +156,7 @@ func TestWithSenseClientDisconnection(t *testing.T) { _, err = con.Write([]byte("GET /ping HTTP/1.1\r\nHost: aa\r\n\r\n")) assert.Nil(t, err) time.Sleep(time.Second) + assert.DeepEqual(t, atomic.LoadInt32(&closeFlag), int32(0)) assert.Nil(t, con.Close()) time.Sleep(time.Second) assert.DeepEqual(t, atomic.LoadInt32(&closeFlag), int32(1))