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

Enhancements for RANGE tests #805

Merged
merged 3 commits into from
Jun 5, 2024
Merged

Enhancements for RANGE tests #805

merged 3 commits into from
Jun 5, 2024

Conversation

evgeniiz321
Copy link
Contributor

No description provided.

Evgeniy Zayats added 2 commits June 2, 2024 20:13
Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

Range overflow test?

@carpawell
Copy link
Member

Range overflow test?

As I remember there are some tests about it already, but @evgeniiz321, can prove it.

pytest_tests/tests/object/test_object_api.py Show resolved Hide resolved
pytest_tests/tests/object/test_object_api.py Outdated Show resolved Hide resolved
file_ranges_to_test.append((0, parts[0][1] + parts[1][1] - 1))
# range requires more than two children (it includes OR does not include the first and the last children)
file_ranges_to_test.append((0, complex_object_size - 1))
file_ranges_to_test.append((parts[0][1] + 1, complex_object_size - parts[0][1] - parts[-1][1] - 1))
Copy link
Member

Choose a reason for hiding this comment

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

looks working correctly but really relies on the fact that there will always be more than two parts, not sure if it is error-proof

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With the current settings there always will be more than two parts. If in the future we will update something, we will update this accordingly. Making an error-proof test usually is a waste of time.

@evgeniiz321
Copy link
Contributor Author

Range overflow test?

Yes, we already have it in negative scenarios.

@evgeniiz321 evgeniiz321 force-pushed the ezayats/ranges branch 2 times, most recently from f32138d to 11563ab Compare June 5, 2024 01:20
@roman-khimov roman-khimov merged commit 61952fa into master Jun 5, 2024
3 of 4 checks passed
@roman-khimov roman-khimov deleted the ezayats/ranges branch June 5, 2024 14:46
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