Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
private/testplanet: integrate GC bloom filter service
We would like to have separate process/command to collect bloom filters from source different than production DBs. Such process will use segment loop to build bloom filters for all storage nodes and will send it to Storj bucket. This change adds integration with testplanet which makes writing unit tests possible. Updates storj/team-metainfo#120 Change-Id: I7b335c5dafa8cffe265c56b75d8c8f8567580893
- Loading branch information
Showing
3 changed files
with
63 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (C) 2022 Storj Labs, Inc. | ||
// See LICENSE for copying information. | ||
|
||
package bloomfilter_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"go.uber.org/zap" | ||
|
||
"storj.io/common/testcontext" | ||
"storj.io/storj/private/testplanet" | ||
"storj.io/storj/satellite" | ||
) | ||
|
||
func TestGarbageCollectionBloomFilters(t *testing.T) { | ||
testplanet.Run(t, testplanet.Config{ | ||
SatelliteCount: 1, | ||
Reconfigure: testplanet.Reconfigure{ | ||
Satellite: func(log *zap.Logger, index int, config *satellite.Config) { | ||
config.GarbageCollectionBF.Enabled = true | ||
}, | ||
}, | ||
}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) { | ||
// TODO test will be replaced with something more meaningful when service | ||
// will be fully implemented | ||
planet.Satellites[0].GarbageCollection.BloomFilters.Loop.Pause() | ||
planet.Satellites[0].GarbageCollection.BloomFilters.Loop.TriggerWait() | ||
}) | ||
} |