Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complex object chunk deletion protection lock tests are skipped #535

Closed
vvarg229 opened this issue Mar 22, 2023 · 3 comments
Closed

Complex object chunk deletion protection lock tests are skipped #535

vvarg229 opened this issue Mar 22, 2023 · 3 comments
Labels
bug Something isn't working I3 Minimal impact S4 Routine U4 Nothing urgent

Comments

@vvarg229
Copy link
Collaborator

The test_complex_object_chunks_should_also_be_protected_from_deletion and the test_link_object_of_complex_object_should_also_be_protected_from_deletion tests failed with an error at the "Try to delete link object":

self = <test_object_lock.TestObjectLockWithGrpc object at 0x7fde1ff78fa0>
locked_storage_object = StorageObjectInfo(cid='4EyFGaKjB7txNPif5Xonb3ustc7q3AD6b2bkqpXoahx4', oid='7TiL3C5a3w9oodHs2QmXE6rSgFQe4ezXuHSEjL5y8L5...KjB7txNPif5Xonb3ustc7q3AD6b2bkqpXoahx4', oid='oSQsZG8T82p7EhCEh5HHunHgvSRutGawDKQesQHkzcM', lifetime=5, expire_at=16)])

    @allure.title("Link object of complex object should also be protected from deletion")
    @pytest.mark.parametrize(
        # Only complex objects are required for this test
        "locked_storage_object",
        [pytest.lazy_fixture("complex_object_size")],
        indirect=True,
    )
    # @pytest.mark.skip(reason='Failed: DID NOT RAISE <class \'Exception\'>')
    def test_link_object_of_complex_object_should_also_be_protected_from_deletion(
        self,
        locked_storage_object: StorageObjectInfo,
    ):
        """
        Link object of complex object should also be protected from deletion
        """
    
        link_object_id = get_link_object(
            locked_storage_object.wallet_file_path,
            locked_storage_object.cid,
            locked_storage_object.oid,
            self.shell,
            self.cluster.storage_nodes,
            is_direct=False,
        )
        with allure.step(f"Try to delete link object {link_object_id}"):
>           with pytest.raises(Exception, match=OBJECT_IS_LOCKED):
E           Failed: DID NOT RAISE <class 'Exception'>

pytest_tests/testsuites/object/test_object_lock.py:669: Failed

Allure report:
test_object_run.zip

@vvarg229 vvarg229 self-assigned this Mar 22, 2023
@vvarg229 vvarg229 added bug Something isn't working testcases labels Mar 22, 2023
roman-khimov added a commit that referenced this issue Mar 22, 2023
Tests that fail with the error "DID NOT RAISE <class 'Exception'>" are
marked as skip.
These tests are also marked as nspcc_dev__neofs_testcases__issue_535.
See #535 for details.
@vvarg229 vvarg229 removed their assignment Mar 22, 2023
vvarg229 added a commit to vvarg229/neofs-testcases that referenced this issue May 5, 2023
This commit removes the @pytest.mark.skip and issue_* decorators that were
temporarily skipping tests related to specific issues. The problems
associated with these tests have been resolved in the neofs-node project,
allowing them to be executed along with other tests.

List of removed issues:
nspcc-dev/neofs-node#2262
nspcc-dev#519
nspcc-dev#520
nspcc-dev#521
nspcc-dev#523
nspcc-dev#524
nspcc-dev#533
nspcc-dev#539
https://j.yadro.com/browse/OBJECT-628

But according to the results of test runs added issues, here is their list:
nspcc-dev#535
nspcc-dev#537
nspcc-dev#542
nspcc-dev#544
nspcc-dev#558
nspcc-dev#559

Signed-off-by: Oleg Kulachenko <oleg@nspcc.ru>
@roman-khimov
Copy link
Member

Please fix the test according to nspcc-dev/neofs-api#253 (see nspcc-dev/neofs-node#2383 (comment)).

@evgeniiz321
Copy link
Contributor

evgeniiz321 commented Aug 15, 2023

Both of these tests suffer from a different problem. There are two assumptions that are checked in these tests:

  1. Complex object chunks should also be protected from deletion - it means that if we lock a complex object, its chunks are locked as well
  2. Link object of complex object should also be protected from deletion - same as above, if we lock a complex object, its link is locked as well

Both of these are currently not true - if we lock a complex object its corresponding chunks are not locked, the same with a link. But we can separately lock each chunk of a complex object, or a link. In this case - they are really locked. But there is no inherit lock from a complex object.

So the question is - are these assumptions correct? If so - these are product bugs. If no - I will correct tests accordingly.

@roman-khimov
Copy link
Member

I'd say both are correct. We broadcast lock objects at the moment (each container node has them), so they can be associated with chunks if they're to have split ID inside. Do they have it, @cthulhu-rider?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working I3 Minimal impact S4 Routine U4 Nothing urgent
Projects
None yet
Development

No branches or pull requests

3 participants