Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing Plans #213

Open
michaelsbradleyjr opened this issue Aug 16, 2022 · 2 comments
Open

Testing Plans #213

michaelsbradleyjr opened this issue Aug 16, 2022 · 2 comments

Comments

@michaelsbradleyjr
Copy link
Contributor

michaelsbradleyjr commented Aug 16, 2022

During the testground-focused team call today we discussed some key tests of correctness and resilience for nim-codex that should be documented and run manually by multiple members of the team.

There should also be automated equivalents of those same tests, making use of Testground.

Issue #98 needs to be resolved for these tests to work correctly.

  1. Upload a file to a node, download that file from the same node, check that the uploaded and downloaded file contents are identical (using a hash).

  2. Start two nodes, upload a file to one of the nodes, then download it from from the other one, check that file contents are identical (using a hash).

  3. Start four nodes, upload a file to one node, then download it from two others; when those downloads are complete, start downloading it from the remaining node and during that final download halt the node to which it was originally uploaded and one of the nodes from which it was downloaded previously. The file should still download correctly (can be checked using a hash).

@Bulat-Ziganshin
Copy link
Contributor

A few ideas:

  • write file generator gen SIZE [SEED] that uses simple PRNG to generate file of given size and use these files for all tests
  • use fast hash like CRC-32 instead of file comparison

this way, we will don't need to store/download test files. Just generate it as required and make textfile with hash sums of files used in tests with lines size seed hashsum

@michaelsbradleyjr
Copy link
Contributor Author

michaelsbradleyjr commented Aug 16, 2022

Good ideas. Using a hash is definitely the way to check that file contents are identical, I didn't mean to suggest contents need to be compared byte by byte. I've updated the original issue description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants