Skip to content

🐛 port number generation should not depend on the Locale (tests)#2323

Merged
dadoonet merged 1 commit intomasterfrom
fix/readOptionalInt-locale
Mar 12, 2026
Merged

🐛 port number generation should not depend on the Locale (tests)#2323
dadoonet merged 1 commit intomasterfrom
fix/readOptionalInt-locale

Conversation

@dadoonet
Copy link
Owner

@dadoonet dadoonet commented Mar 12, 2026

This is happening with some Locale:

mvn integration-test -Dtests.seed=26635F93F291B78 -Dtests.class=fr.pilato.elasticsearch.crawler.fs.test.integration.elasticsearch.FsCrawlerRestIT -Dtests.method="uploadDocumentWithSshPlugin" -Dtests.locale=mni-Beng-IN

Note

Low Risk
Low risk: only adjusts integration test string formatting to be locale-stable; no production logic is changed.

Overview
Makes the SSH and FTP REST integration tests locale-independent by building the request JSON via String.format(Locale.ROOT, ...) instead of text-block .formatted(...), ensuring numeric ports are always serialized as ASCII digits under non-English locales.

Written by Cursor Bugbot for commit 2a2375b. This will update automatically on new commits. Configure here.

@dadoonet dadoonet self-assigned this Mar 12, 2026
@dadoonet dadoonet added bug For confirmed bugs test Related to tests only component:rest labels Mar 12, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

With some Locale it's failing to generate a good number.

```sh
mvn integration-test -Dtests.seed=26635F93F291B78 -Dtests.class=fr.pilato.elasticsearch.crawler.fs.test.integration.elasticsearch.FsCrawlerRestIT -Dtests.method="uploadDocumentWithSshPlugin" -Dtests.locale=mni-Beng-IN
```
@dadoonet dadoonet force-pushed the fix/readOptionalInt-locale branch from 30cafec to 2a2375b Compare March 12, 2026 14:06
@sonarqubecloud
Copy link

@dadoonet dadoonet changed the title 🐛 enhance readOptionalInt to handle string representations of integers 🐛 port number generation should not depend on the Locale (tests) Mar 12, 2026
@dadoonet dadoonet merged commit 8dffeb0 into master Mar 12, 2026
18 checks passed
@dadoonet dadoonet deleted the fix/readOptionalInt-locale branch March 12, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug For confirmed bugs component:rest test Related to tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant