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

Fix a slight usability issue with TestFileIO #412

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

andrew4699
Copy link
Contributor

Description

TestFileIOs could be forced to throw an exception when calling getLength. Unfortunately this is hard to use because TestFileIOs also contain functionality for measuring file sizes. This meant that any supplied getLength exception would result in the construction of an InputFile to immediately fail instead of the exception being deferred to later.

This PR makes the TestFileIO use the non-exception-throwing-InputFile for measurement. Unfortunately the previous tests were relying on getLength being called at some point during the workloads but Iceberg seems to rarely call getLength, thus I just wrote a separate test to validate the functionality.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Existing tests

Checklist:

Please delete options that are not relevant.

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

@eric-maynard eric-maynard enabled auto-merge (squash) October 29, 2024 19:31
@eric-maynard eric-maynard merged commit 041a8ff into apache:main Oct 29, 2024
5 checks passed
@andrew4699 andrew4699 deleted the aguterman-fix-test-class-issue branch October 29, 2024 21:27
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.

2 participants