From 2468037f6fdaf6fd81deda9c97a6b7ab193f35f6 Mon Sep 17 00:00:00 2001 From: NSMBot Date: Mon, 11 Jan 2021 14:45:33 +0000 Subject: [PATCH] fix failing tests Signed-off-by: Denis Tingaikin --- main_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main_test.go b/main_test.go index 77dd9b2..30355be 100644 --- a/main_test.go +++ b/main_test.go @@ -203,7 +203,9 @@ func (t *RegistryTestSuite) TestNetworkServiceEndpointRegistration() { t.Nil(err) t.NotEmpty(result.Name) - stream, err := client.Find(context.Background(), ®istry.NetworkServiceEndpointQuery{NetworkServiceEndpoint: result}) + stream, err := client.Find(context.Background(), ®istry.NetworkServiceEndpointQuery{NetworkServiceEndpoint: ®istry.NetworkServiceEndpoint{ + Name: result.Name, + }}) t.Nil(err) list := registry.ReadNetworkServiceEndpointList(stream) t.Len(list, 1) @@ -245,7 +247,8 @@ func (t *RegistryTestSuite) TestNetworkServiceEndpointRegistrationExpiration() { t.Nil(err) list = registry.ReadNetworkServiceEndpointList(stream) return len(list) == 0 - }, time.Second*5, time.Millisecond*100) + }, time.Until(result.GetExpirationTime().AsTime())+time.Second*5, time.Millisecond*100) + } func (t *RegistryTestSuite) TestNetworkServiceEndpointClientRefreshingTime() {