nspcc-dev / nspcc-dev/neofs-node
Improve shard/engine construction in tests
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38
- Forks
- 51
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 38
Description
We have a lot of different tests which test different things:
- Some tests may need 1 shard, others need many.
- Some tests need particular error threshold, others use default.
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing test code that constructs engines and shards, and locate the shared defaults for shard count, error thresholds, and storage backends. Introduce the proposed newEngine(prm) entry point so those defaults can be overridden, then verify that existing tests still construct equivalent engines and that custom storage and failover scenarios remain possible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100