Skip to content

Commit 96d7d64

Browse files
committed
fix(routing/providerquerymanager): unexport SetFindProviderTimeout
1 parent e739a0c commit 96d7d64

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

routing/providerquerymanager/providerquerymanager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ type inProgressRequest struct {
141141
incoming chan peer.ID
142142
}
143143

144-
// SetFindProviderTimeout changes the timeout for finding providers
145-
func (pqm *ProviderQueryManager) SetFindProviderTimeout(findProviderTimeout time.Duration) {
144+
// setFindProviderTimeout changes the timeout for finding providers
145+
func (pqm *ProviderQueryManager) setFindProviderTimeout(findProviderTimeout time.Duration) {
146146
pqm.timeoutMutex.Lock()
147147
pqm.findProviderTimeout = findProviderTimeout
148148
pqm.timeoutMutex.Unlock()

routing/providerquerymanager/providerquerymanager_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ func TestFindProviderTimeout(t *testing.T) {
302302
ctx := context.Background()
303303
providerQueryManager := mustNotErr(New(ctx, fpn))
304304
providerQueryManager.Startup()
305-
providerQueryManager.SetFindProviderTimeout(2 * time.Millisecond)
305+
providerQueryManager.setFindProviderTimeout(2 * time.Millisecond)
306306
keys := generateCids(1)
307307

308308
sessionCtx, cancel := context.WithTimeout(ctx, 5*time.Second)
@@ -326,7 +326,7 @@ func TestFindProviderPreCanceled(t *testing.T) {
326326
ctx := context.Background()
327327
providerQueryManager := mustNotErr(New(ctx, fpn))
328328
providerQueryManager.Startup()
329-
providerQueryManager.SetFindProviderTimeout(100 * time.Millisecond)
329+
providerQueryManager.setFindProviderTimeout(100 * time.Millisecond)
330330
keys := generateCids(1)
331331

332332
sessionCtx, cancel := context.WithCancel(ctx)
@@ -351,7 +351,7 @@ func TestCancelFindProvidersAfterCompletion(t *testing.T) {
351351
ctx := context.Background()
352352
providerQueryManager := mustNotErr(New(ctx, fpn))
353353
providerQueryManager.Startup()
354-
providerQueryManager.SetFindProviderTimeout(100 * time.Millisecond)
354+
providerQueryManager.setFindProviderTimeout(100 * time.Millisecond)
355355
keys := generateCids(1)
356356

357357
sessionCtx, cancel := context.WithCancel(ctx)

0 commit comments

Comments
 (0)