forked from TrueCloudLab/frostfs-node
[#1770] shard: Move NewEpoch event routing on SE level
It will allow dynamic shard management. Closing a shard does not allow removing event handlers. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
9374823950
commit
2d7166f8d0
7 changed files with 50 additions and 73 deletions
|
@ -139,7 +139,7 @@ func testNewShard(t testing.TB, id int) *shard.Shard {
|
|||
return s
|
||||
}
|
||||
|
||||
func testEngineFromShardOpts(t *testing.T, num int, extraOpts func(int) []shard.Option) *StorageEngine {
|
||||
func testEngineFromShardOpts(t *testing.T, num int, extraOpts []shard.Option) *StorageEngine {
|
||||
engine := New()
|
||||
for i := 0; i < num; i++ {
|
||||
_, err := engine.AddShard(append([]shard.Option{
|
||||
|
@ -155,7 +155,7 @@ func testEngineFromShardOpts(t *testing.T, num int, extraOpts func(int) []shard.
|
|||
),
|
||||
shard.WithPiloramaOptions(
|
||||
pilorama.WithPath(filepath.Join(t.Name(), fmt.Sprintf("pilorama%d", i)))),
|
||||
}, extraOpts(i)...)...)
|
||||
}, extraOpts...)...)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue