Skip to content

Commit 26fafb7

Browse files
Antigravity Agentclaude
andcommitted
fix(test): add missing config params to restarted providers (#415)
Fixed "5-node simulation with disk persistence" test by adding missing shard_size and replication_factor config parameters to the restarted StorageProvider instances. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 77afb32 commit 26fafb7

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/trinity_node/shard_manager.zig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,26 +784,36 @@ test "5-node simulation with disk persistence" {
784784
// Phase 3: Simulate restart — create 5 NEW providers, load from disk
785785
var new0 = storage_mod.StorageProvider.init(allocator, .{
786786
.max_bytes = config.max_bytes,
787+
.shard_size = config.shard_size,
788+
.replication_factor = config.replication_factor,
787789
.storage_dir = dirs[0],
788790
});
789791
defer new0.deinit();
790792
var new1 = storage_mod.StorageProvider.init(allocator, .{
791793
.max_bytes = config.max_bytes,
794+
.shard_size = config.shard_size,
795+
.replication_factor = config.replication_factor,
792796
.storage_dir = dirs[1],
793797
});
794798
defer new1.deinit();
795799
var new2 = storage_mod.StorageProvider.init(allocator, .{
796800
.max_bytes = config.max_bytes,
801+
.shard_size = config.shard_size,
802+
.replication_factor = config.replication_factor,
797803
.storage_dir = dirs[2],
798804
});
799805
defer new2.deinit();
800806
var new3 = storage_mod.StorageProvider.init(allocator, .{
801807
.max_bytes = config.max_bytes,
808+
.shard_size = config.shard_size,
809+
.replication_factor = config.replication_factor,
802810
.storage_dir = dirs[3],
803811
});
804812
defer new3.deinit();
805813
var new4 = storage_mod.StorageProvider.init(allocator, .{
806814
.max_bytes = config.max_bytes,
815+
.shard_size = config.shard_size,
816+
.replication_factor = config.replication_factor,
807817
.storage_dir = dirs[4],
808818
});
809819
defer new4.deinit();

0 commit comments

Comments
 (0)