nspcc-dev / neofs-testcases

NeoFS integration testcases
GNU General Public License v3.0
3 stars 18 forks source link

Replication failure test #895

Open roman-khimov opened 1 day ago

roman-khimov commented 1 day ago

Is your feature request related to a problem? Please describe.

I'm always frustrated when we don't have a test for put failure scenario.

Describe the solution you'd like

REP 1 CBF 4 (or REP 2, but that requires more objects), have nodes failing requests (@carpawell can tell how to do that), push some number (10?) of objects into the node (the probability of hitting the relay-only scenario is 3/4 for REP 1 CBF 4), check that put never succeeds (with 0.43.0 there will be cases where it does).

Additional context

https://github.com/nspcc-dev/neofs-node/pull/3014 https://github.com/nspcc-dev/neofs-node/issues/2948

carpawell commented 1 day ago

The test needs two sets of nodes: one that belongs to some container and one that does not (e.g. REP 1 CBF 1). Then there should be some locked object X that has been put and protected from deletion. Then try to delete X but send a request to a node that does not belong to a container, it will have to redirect the request without checking any lock status. In this case we think it will work OK (no error but the object will not be deleted obviously) with 0.43.0 version but will fail (correctly) with the current master. My suggestion differs a little from the issue's, but I believe it is easier to implement. If anything goes wrong with the provided scenario (it does not fail when it should or vice versa) tell me, I will recheck.