From 561bd76e6b4cd44d1e87722ed83c8915a0c05c8f Mon Sep 17 00:00:00 2001 From: gabe Date: Tue, 31 Oct 2023 16:39:24 -0700 Subject: [PATCH] wait --- impl/pkg/server/server_pkarr_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/impl/pkg/server/server_pkarr_test.go b/impl/pkg/server/server_pkarr_test.go index f654e3cd..4b28f571 100644 --- a/impl/pkg/server/server_pkarr_test.go +++ b/impl/pkg/server/server_pkarr_test.go @@ -8,6 +8,7 @@ import ( "net/http" "net/http/httptest" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -54,6 +55,9 @@ func TestPKARRRouter(t *testing.T) { req = httptest.NewRequest(http.MethodGet, fmt.Sprintf("%s/%s", testServerURL, suffix), nil) c = newRequestContextWithParams(w, req, map[string]string{IDParam: suffix}) + // wait for the record to be published + time.Sleep(10 * time.Second) + pkarrRouter.GetRecord(c) assert.True(t, is2xxResponse(w.Code))