Improve shard/engine construction in tests #740

Open
opened 2025-12-28 17:20:33 +00:00 by sami · 0 comments
Owner

Originally created by @fyrchik on GitHub (Sep 12, 2022).

We have a lot of different tests which test different things:

  1. Some tests may need 1 shard, others need many.
  2. Some tests need particular error threshold, others use default.
  3. Some tests need to corrupt data on disk and thus may need a custom storage backend constructed beforehand.

The proposal is to have a single newEngine(prm) in tests, where all defaults can be overridden.
This way we can avoid having to create engine/shard manually when writing specific tests.

I have assigned P1 priority, because albeit it is a test refactor, we will certainly need this in Q4, when we will test all failover/storage corruption scenarios.

Originally created by @fyrchik on GitHub (Sep 12, 2022). We have a lot of different tests which test different things: 1. Some tests may need 1 shard, others need many. 2. Some tests need particular error threshold, others use default. 3. Some tests need to corrupt data on disk and thus may need a custom storage backend constructed beforehand. The proposal is to have a single `newEngine(prm)` in tests, where all defaults can be overridden. This way we can avoid having to create engine/shard manually when writing specific tests. I have assigned P1 priority, because albeit it is a test refactor, we will certainly need this in Q4, when we will test all failover/storage corruption scenarios.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
nspcc-dev/neofs-node#740
No description provided.