Skip to content

Commit

Permalink
Increase page size in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rdaum committed Dec 30, 2023
1 parent 537c3fd commit 7b0ff77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/db/src/tuplebox/slots/slotbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ mod tests {
// fill until full... (SlotBoxError::BoxFull)
loop {
let mut rng = thread_rng();
let tuple_len = rng.gen_range(1..(slot_page_empty_size(4096) - slot_page_overhead()));
let tuple_len = rng.gen_range(1..(slot_page_empty_size(32768) - slot_page_overhead()));
let tuple: Vec<u8> = rng.sample_iter(&Alphanumeric).take(tuple_len).collect();
match sb.allocate(tuple.len(), Some(&tuple)) {
Ok(tuple_id) => {
Expand All @@ -289,7 +289,7 @@ mod tests {
// and then scan back and verify their presence/equality.
#[test]
fn test_basic_add_fill_etc() {
let mut sb = SlotBox::new(4096, 4096 * 64);
let mut sb = SlotBox::new(32768, 32768 * 64);
let tuples = fill_until_full(&mut sb);
for (id, tuple) in tuples {
let retrieved = sb.get(id).unwrap();
Expand All @@ -301,7 +301,7 @@ mod tests {
// everything mmap DONTNEED'd, and we should be able to re-fill it again, too.
#[test]
fn test_full_fill_and_empty() {
let mut sb = SlotBox::new(4096, 4096 * 64);
let mut sb = SlotBox::new(32768, 32768 * 64);
let tuples = fill_until_full(&mut sb);
for (id, _) in &tuples {
sb.remove(*id).unwrap();
Expand All @@ -316,7 +316,7 @@ mod tests {
// fill back up again and verify the new presence.
#[test]
fn test_fill_and_free_and_refill_etc() {
let mut sb = SlotBox::new(4096, 4096 * 64);
let mut sb = SlotBox::new(32768, 32768 * 64);
let mut tuples = fill_until_full(&mut sb);
let mut rng = thread_rng();
let mut freed_tuples = Vec::new();
Expand Down

0 comments on commit 7b0ff77

Please sign in to comment.