Refactor tests to remove test fixtures and serial crate #10

Closed
opened 2020-12-02 11:00:31 +03:00 by Ggg_123 · 2 comments
Collaborator

serial crate is required only because tests use the same test files, so they cannot read/write them at the same time.
Replacing serial with something like tempfile and moving test data from files into code will allow tests to run in parallel, making their execution faster and also prevent test data from becoming corrupted by misbehaving tests.

`serial` crate is required only because tests use the same test files, so they cannot read/write them at the same time. Replacing serial with something like [tempfile](https://crates.io/crates/tempfile) and moving test data from files into code will allow tests to run in parallel, making their execution faster and also prevent test data from becoming corrupted by misbehaving tests.
Ggg_123 self-assigned this 2020-12-02 11:00:31 +03:00
Owner

serial was removed as a dependency, tests were rewritten to use separate temporary files.

Unnecessary files are cleaned up with auxiliary struct with the drop trait, which seems to work just fine and does not require another dependency. Maybe just keep this solution or is tempfile superior in some way?

Do we really need to move test data into the code? I feel like separating them is a cleaner approach.

`serial` was removed as a dependency, tests were rewritten to use separate temporary files. Unnecessary files are cleaned up with auxiliary struct with the `drop` trait, which seems to work just fine and does not require another dependency. Maybe just keep this solution or is `tempfile` superior in some way? Do we really need to move test data into the code? I feel like separating them is a cleaner approach.
Author
Collaborator

Nvm then.

Nvm then.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: dkanus/Avarice#10
No description provided.