fix infra: saturating memory tracker, check build imports, buffer growth
test
This commit is contained in:
@@ -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" {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user