[Core] Improve hash collision avoidance in prefix caching (#12621)
Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
@@ -65,8 +65,8 @@ class TestPrefixCachingBlock:
|
||||
|
||||
previous_block = MagicMock(spec=PrefixCachingBlock)
|
||||
prev_block_hash = random.randint(0, 1000)
|
||||
previous_block.content_hash = (prev_block_hash
|
||||
if prev_block_has_hash else None)
|
||||
previous_block.content_hash = (prev_block_hash if prev_block_has_hash
|
||||
else hash('None'))
|
||||
|
||||
num_to_fill = block_size if is_curr_block_full else random.randint(
|
||||
0, block_size - 1)
|
||||
|
||||
Reference in New Issue
Block a user