Skip to content

Commit

Permalink
fix(routing/providerquerymanager): unexport SetFindProviderTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmahmann committed Jul 26, 2024
1 parent e739a0c commit 96d7d64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions routing/providerquerymanager/providerquerymanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions routing/providerquerymanager/providerquerymanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 96d7d64

Please sign in to comment.