这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Nov 5, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

balazs-szucs and others added 2 commits November 5, 2025 12:43
…mentation (#4708)

# Description of Changes

Updated test files to use fixed string identifiers and timestamps
instead of random UUIDs and system-dependent times. These changes make
the tests more deterministic and easier to debug.

**Test determinism and clarity improvements:**

* Replaced randomly generated UUIDs with fixed string identifiers in
test cases for `FileStorageTest.java` and `TaskManagerTest.java` to
ensure predictable test data.
* Changed usages of `System.currentTimeMillis()` and `Instant.now()` to
fixed values in tests for `TempFileCleanupServiceTest.java`,
`FileMonitorTest.java`, and `TextFinderTest.java` to avoid flakiness due
to timing issues.
* Improved code clarity by adding explanatory comments for time offsets
and by using direct string comparisons instead of `equals()` where
appropriate.
* Refactored a timeout simulation in `JobExecutorServiceTest.java` to
use busy-waiting instead of `Thread.sleep`, reducing test flakiness and
improving reliability.



<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ests; stabilize AttemptCounter timing (#4822)

# Description of Changes

- **What was changed**
  - Added new MVC tests:
- `ConverterWebControllerTest` covering simple converter routes,
`/pdf-to-cbr` enable/disable behavior via `EndpointConfiguration`,
Python availability flag, and `maxDPI` defaults/overrides for
`/pdf-to-img` and `/pdf-to-video`.
- `GeneralWebControllerTest` covering many editor/organizer routes’
view/model mapping, `/sign` font discovery from classpath and
`/opt/static/fonts`, handling of missing `UserService`, robust filtering
of malformed font entries, and `/pipeline` JSON config discovery with
graceful fallback on `Files.walk` errors.
- `HomeWebControllerTest` covering `/about`, `/releases`, legacy
redirects, root page’s `SHOW_SURVEY` behavior, `/robots.txt` for
`googlevisibility` true/false/null, and `/licenses` JSON parsing with
IOException fallback.
  - Extended proprietary security tests:
- `LoginAttemptServiceTest` (reflective construction) validating
`getRemainingAttempts(...)` for disabled/blank keys, empty cache,
decreasing logic, and intentionally negative values when over the limit
(documented current behavior).
  - Hardened `AttemptCounterTest`:
- Eliminated timing flakiness by using generous windows and setting
`lastAttemptTime` to “now”.
- Added edge-case assertions for zero/negative windows to document
current semantics after switching comparison to `elapsed >=
attemptIncrementTime`.
- **Why the change was made**
- To increase test coverage across critical web endpoints and security
logic, document current edge-case behavior, and prevent regressions
around view resolution, environment/property-driven flags, resource
discovery, and timing-sensitive logic.


---

## Checklist

### General

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### Translations (if applicable)

- [ ] I ran
[`scripts/counter_translation.py`](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/docs/counter_translation.md)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
@pull pull bot locked and limited conversation to collaborators Nov 5, 2025
@pull pull bot added the ⤵️ pull label Nov 5, 2025
@pull pull bot merged commit 2acb3aa into MinnoxiK:main Nov 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants