Skip to content

week1_day5 test #126

@ppdogg

Description

@ppdogg

Insufficient testing for Task 3。

The reason is commented here

I suggest add some modification to the test function test_task3_storage_get:

  1. add a key 10 to sst1
     let sst1 = generate_sst(
        10,
        dir.path().join("10.sst"),
        vec![
            (Bytes::from_static(b"0"), Bytes::from_static(b"233")),
            (Bytes::from_static(b"10"), Bytes::from_static(b"test")),
            (Bytes::from_static(b"00"), Bytes::from_static(b"2333333")),
            (Bytes::from_static(b"4"), Bytes::from_static(b"23")),
        ],
        Some(storage.block_cache.clone()),
    );
  1. try to get the key 10
    assert_eq!(
        storage.get(b"10").unwrap(),
        Some(Bytes::from_static(b"test"))
    );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions