Skip to content

Adjust tests#86

Merged
roman-khimov merged 2 commits intomasterfrom
adjust-tests
Apr 4, 2025
Merged

Adjust tests#86
roman-khimov merged 2 commits intomasterfrom
adjust-tests

Conversation

@smallhive
Copy link

No description provided.

_verify_atomic_key_data(bucket_name, objname, file_size, "B")


@pytest.mark.fails_on_dbstore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the test expectations here? Why is it expecting any particular order?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about test expectations, but I see the tests write in parallel the object with the same name

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@roman-khimov roman-khimov Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the test is a flawed, but can be fixed. It says

confirm that it is all one or the other

But this means that any of the results (A or B) is correct. And the way it works is uploading objects ~concurrently, so we can't rely on B always being the last one. So to me that's the way to fix this test, not by disabling it (I admit it's a bit strange one, but the idea is to never get an AB mix which can theoretically happen).

Copy link

@evgeniiz321 evgeniiz321 Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test initiates one object upload, during this upload it starts and finishes another upload of the same object and after that the test finishes the first upload. Test expectation is that the object will have the contents of the first upload, because it finishes later.
But the test relies on the implementation of the boto3 put_object and I'm not really sure if the first upload really finishes later. But, if the test worked previously, maybe it was a correct assumption. Otherwise it would be a big flipper.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we expect rewind_put_fp_a() to finish first we can also add a delay into it.

@smallhive smallhive force-pushed the adjust-tests branch 2 times, most recently from 673df17 to 856cc82 Compare March 14, 2025 06:39
@smallhive smallhive force-pushed the adjust-tests branch 2 times, most recently from 42fee77 to ac6b811 Compare April 2, 2025 04:51
This delay is a temporary solution. It required to be able to get the right order of objects. There is some limitation to understand what object was first in the same second. See nspcc-dev/neofs-s3-gw#1066.

Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
These tests write twice object with the same name. There is some limitation to understand what object was first in the same second. See nspcc-dev/neofs-s3-gw#1066.

Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
@roman-khimov roman-khimov merged commit 1a79130 into master Apr 4, 2025
1 check passed
@roman-khimov roman-khimov deleted the adjust-tests branch April 4, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants