fix infra: saturating memory tracker, check build imports, buffer growth

test
This commit is contained in:
2026-02-11 14:22:05 -03:00
parent 47f949e4cc
commit 789897b51a
4 changed files with 26 additions and 11 deletions

View File

@@ -399,9 +399,9 @@ test "buffer capacity management" {
// Ensure capacity should work for current capacity
try buffer.ensureCapacity(50); // Less than current capacity
try buffer.ensureCapacity(150); // More than current capacity
// Note: ensureCapacity for larger size is not implemented yet
// This would require buffer growth implementation
try buffer.ensureCapacity(150); // More than current capacity — triggers realloc growth
// Verify buffer actually grew
try testing.expect(buffer.base.capacity >= 150);
}
test "buffer type identification" {

View File

@@ -99,8 +99,8 @@ test "replay protection cleanup handles allocation failures" {
const peer_id = [_]u8{1} ** 32;
// Add some old messages that should be cleaned up
try protector.checkMessage(1, old_time, 1000, 0, peer_id);
try protector.checkMessage(2, old_time, 1001, 0, peer_id);
try protector.checkMessage(1, old_time, 1000, 0, peer_id, 0);
try protector.checkMessage(2, old_time, 1001, 0, peer_id, 0);
// Force cleanup - should handle any allocation failures gracefully
protector.forceCleanup();