satellite/overlay: remove unnecessary test helper

Change-Id: I8439eec4ed440f60353fc620ca906a917a03613c
This commit is contained in:
paul cannon 2023-05-16 15:50:21 -05:00
parent 1f4f79b6b3
commit 958d8676d0
3 changed files with 3 additions and 8 deletions

View File

@ -932,11 +932,6 @@ func (service *Service) TestNodeCountryCode(ctx context.Context, nodeID storj.No
return nil
}
// TestRefreshUploadSelectionCache refreshes the upload selection cache.
func (service *Service) TestRefreshUploadSelectionCache(ctx context.Context) (err error) {
return service.UploadSelectionCache.Refresh(ctx)
}
func (service *Service) insertReputationNodeEvents(ctx context.Context, email string, id storj.NodeID, repEvents []nodeevents.Type) {
defer mon.Task()(&ctx)(nil)

View File

@ -302,7 +302,7 @@ func TestCleanRepairQueueObserver(t *testing.T) {
}
require.NoError(t, observer.RefreshReliabilityCache(ctx))
require.NoError(t, planet.Satellites[0].RangedLoop.Overlay.Service.TestRefreshUploadSelectionCache(ctx))
require.NoError(t, planet.Satellites[0].RangedLoop.Overlay.Service.UploadSelectionCache.Refresh(ctx))
// check that repair queue is empty to avoid false positive
count, err := repairQueue.Count(ctx)
@ -324,7 +324,7 @@ func TestCleanRepairQueueObserver(t *testing.T) {
}
require.NoError(t, observer.RefreshReliabilityCache(ctx))
require.NoError(t, planet.Satellites[0].RangedLoop.Overlay.Service.TestRefreshUploadSelectionCache(ctx))
require.NoError(t, planet.Satellites[0].RangedLoop.Overlay.Service.UploadSelectionCache.Refresh(ctx))
// The checker will not insert/update the now healthy segments causing
// them to be removed from the queue at the end of the checker iteration

View File

@ -3279,7 +3279,7 @@ func TestRepairClumpedPieces(t *testing.T) {
}
err = satellite.DB.OverlayCache().UpdateCheckIn(ctx, checkInInfo, time.Now().UTC(), overlay.NodeSelectionConfig{})
require.NoError(t, err)
err = satellite.RangedLoop.Overlay.Service.TestRefreshUploadSelectionCache(ctx)
err = satellite.RangedLoop.Overlay.Service.UploadSelectionCache.Refresh(ctx)
require.NoError(t, err)
// running repair checker again should put the segment into the repair queue