Skip to content

GH-5481: Fix JSON functional test on Windows - #5491

Open
hutiefang76 wants to merge 1 commit into
spring-projects:mainfrom
hutiefang76:codex/spring-batch-5481-crlf
Open

GH-5481: Fix JSON functional test on Windows#5491
hutiefang76 wants to merge 1 commit into
spring-projects:mainfrom
hutiefang76:codex/spring-batch-5481-crlf

Conversation

@hutiefang76

Copy link
Copy Markdown

Fixes #5481.

The JSON writer is configured to emit LF line endings, while Git may check out the expected JSON resource with CRLF on Windows. Comparing raw MD5 hashes therefore fails even when the JSON output is otherwise identical.

This change normalizes CRLF only in the checked-out expected file. The generated file remains an exact comparison so the test still verifies the writer's configured LF separator. The added tests cover both the Windows checkout case and the inverse case where generated output incorrectly uses CRLF.

Tests:

  • ./mvnw -pl spring-batch-samples -Dit.test=JsonFunctionalTests verify
  • ./mvnw -pl spring-batch-samples verify (74 completed, 0 failures/errors, 11 skipped)

Signed-off-by: 胡铁芳 <137664623+hutiefang76@users.noreply.github.com>
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.

JsonFunctionalTests fails on Windows due to CRLF

1 participant