brianshih1 / mini-key-value-db

1 stars 1 forks source link

Build failing on latest master #10

Closed varunu28 closed 10 months ago

varunu28 commented 10 months ago

With latest master(Commit: d0f4950377cf6f91664d4b098ede06d89d597e0e), running cargo test results in multiple failures(On Mac M1)

test result: FAILED. 63 passed; 38 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.20s

Next steps should be to fix these test cases & add a Github workflow that runs with every PR to run cargo test in order to verify that build remains green

varunu28 commented 10 months ago

@brianshih1 I will be happy to work on this issue

brianshih1 commented 10 months ago

thanks for the catch! Would be awesome if you could add the workflow or fix some tests. I'll also take a look at the failing tests sometime next week!

brianshih1 commented 10 months ago

Currently the test works if it runs via a single thread: cargo test -- --test-threads=1. This is because the tests currently share and clear the same directory: Arc::new(DB::new_cleaned("./tmp/data"

brianshih1 commented 10 months ago

Just merged a commit to generate a random path for each test DB instance. I created another task to clean up the test files created by unit tests here: https://github.com/brianshih1/mini-key-value-db/issues/12. cargo test is passing now.

brianshih1 commented 10 months ago

Just added a github workflow to run cargo build and cargo test!