Skip to content

[Java] Fix TextIO gzip split test on Windows - #40078

Open
xujiantop-crypto wants to merge 1 commit into
apache:masterfrom
xujiantop-crypto:test/enable-textio-gzip-windows
Open

[Java] Fix TextIO gzip split test on Windows#40078
xujiantop-crypto wants to merge 1 commit into
apache:masterfrom
xujiantop-crypto:test/enable-textio-gzip-windows

Conversation

@xujiantop-crypto

Copy link
Copy Markdown

Fixes #20470

testInitialSplitAutoModeGz assumed the generated gzip file would always exceed 2,000 bytes. On Windows, the generated file is 1,970 bytes, so the test failed before exercising FileBasedSource.split.

This derives the requested bundle size from the actual compressed file length. The existing sanity check still proves the input spans more than two requested bundles, while removing the platform-dependent compression-size assumption and allowing the test to run on Windows.

Testing:

  • TextIOReadTest$BasicIOTest.testInitialSplitAutoModeGz on Windows
  • TextIOReadTest$BasicIOTest on Windows (12 tests)
  • :sdks:java:core:spotlessJavaCheck

Signed-off-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @chamikaramj for label java.

This pull request likely touches a core component ("core" label). Please review with scrutiny.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Java core tests fails on windows: io.TextIOReadTest.testInitialSplitAutoModeGz

1 participant