nspcc-dev / nspcc-dev/neofs-node

Improve shard/engine construction in tests

Open
#1,776 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement I4 neofs-storage S2 test U3 U4
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:

  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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.