From 96d7d640689b4a2fc8c4012cba654e837629496b Mon Sep 17 00:00:00 2001 From: Adin Schmahmann Date: Fri, 26 Jul 2024 05:28:43 -0400 Subject: [PATCH] fix(routing/providerquerymanager): unexport SetFindProviderTimeout --- routing/providerquerymanager/providerquerymanager.go | 4 ++-- routing/providerquerymanager/providerquerymanager_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/routing/providerquerymanager/providerquerymanager.go b/routing/providerquerymanager/providerquerymanager.go index 68cdee22c1..af3ae78135 100644 --- a/routing/providerquerymanager/providerquerymanager.go +++ b/routing/providerquerymanager/providerquerymanager.go @@ -141,8 +141,8 @@ type inProgressRequest struct { incoming chan peer.ID } -// SetFindProviderTimeout changes the timeout for finding providers -func (pqm *ProviderQueryManager) SetFindProviderTimeout(findProviderTimeout time.Duration) { +// setFindProviderTimeout changes the timeout for finding providers +func (pqm *ProviderQueryManager) setFindProviderTimeout(findProviderTimeout time.Duration) { pqm.timeoutMutex.Lock() pqm.findProviderTimeout = findProviderTimeout pqm.timeoutMutex.Unlock() diff --git a/routing/providerquerymanager/providerquerymanager_test.go b/routing/providerquerymanager/providerquerymanager_test.go index 3997c6f819..ea6622484a 100644 --- a/routing/providerquerymanager/providerquerymanager_test.go +++ b/routing/providerquerymanager/providerquerymanager_test.go @@ -302,7 +302,7 @@ func TestFindProviderTimeout(t *testing.T) { ctx := context.Background() providerQueryManager := mustNotErr(New(ctx, fpn)) providerQueryManager.Startup() - providerQueryManager.SetFindProviderTimeout(2 * time.Millisecond) + providerQueryManager.setFindProviderTimeout(2 * time.Millisecond) keys := generateCids(1) sessionCtx, cancel := context.WithTimeout(ctx, 5*time.Second) @@ -326,7 +326,7 @@ func TestFindProviderPreCanceled(t *testing.T) { ctx := context.Background() providerQueryManager := mustNotErr(New(ctx, fpn)) providerQueryManager.Startup() - providerQueryManager.SetFindProviderTimeout(100 * time.Millisecond) + providerQueryManager.setFindProviderTimeout(100 * time.Millisecond) keys := generateCids(1) sessionCtx, cancel := context.WithCancel(ctx) @@ -351,7 +351,7 @@ func TestCancelFindProvidersAfterCompletion(t *testing.T) { ctx := context.Background() providerQueryManager := mustNotErr(New(ctx, fpn)) providerQueryManager.Startup() - providerQueryManager.SetFindProviderTimeout(100 * time.Millisecond) + providerQueryManager.setFindProviderTimeout(100 * time.Millisecond) keys := generateCids(1) sessionCtx, cancel := context.WithCancel(ctx)