diff --git a/Makefile b/Makefile index 88e33440..34c3fd47 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ COMMIT ?= $(shell git describe --match=NeVeRmAtCh --always --abbrev=40 --dirty) DEBUG ?= DOCKERPREFIX ?= BUILD_TAGS ?= -LDFLAGS ?= +LDFLAGS ?= BUILDFLAGS ?= -gcflags '$(GCFLAGS)' -ldflags '$(LDFLAGS) -X main.Version=$(VERSION) -X main.Commit=$(COMMIT)' -tags '$(BUILD_TAGS)' ifneq ("$(DEBUG)", "") BUILDFLAGS += -race diff --git a/pkg/proxy/backend/backend_conn_mgr_test.go b/pkg/proxy/backend/backend_conn_mgr_test.go index 89a267fe..000d9769 100644 --- a/pkg/proxy/backend/backend_conn_mgr_test.go +++ b/pkg/proxy/backend/backend_conn_mgr_test.go @@ -646,8 +646,9 @@ func TestGracefulCloseWhenActive(t *testing.T) { { proxy: func(_, _ *pnet.PacketIO) error { ts.mp.GracefulClose() - time.Sleep(300 * time.Millisecond) - require.Equal(t, statusNotifyClose, ts.mp.closeStatus.Load()) + require.Eventually(t, func() bool { + return statusNotifyClose == ts.mp.closeStatus.Load() + }, 300*time.Millisecond, 100*time.Millisecond) return nil }, },