Skip to content

Fix FoliaLib 0.5.1 scheduler fixture compilation - #1727

Merged
BenCodez merged 2 commits into
masterfrom
fix/folialib-051-scheduler-fixtures
Oct 19, 2026
Merged

BenCodez merged 2 commits into
masterfrom
fix/folialib-051-scheduler-fixtures

Conversation

@BenCodez

@BenCodez BenCodez commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

FoliaLib 0.5.1 returns PlatformScheduler from FoliaLib.getImpl(). Seven test fixtures still mocked its parent ServerImplementation interface, preventing test compilation after the SimpleAPI upgrade. Use the resolved return type throughout those fixtures and their test helpers; existing assertions and production behavior are unchanged.

Validation:

  • Reproduced 15 test-compilation errors before the correction.
  • All 164 tests in the seven affected test classes pass against both the currently published AdvancedCore snapshot and the corrected candidate. The follow-up uses inferred types for two deep-stub return values so either scheduler signature compiles without casts.
  • Full test-enabled clean package passes against the exact corrected AdvancedCore 3.8.2-SNAPSHOT candidate from AdvancedCore #369, resolved only from an isolated Maven cache: 2,585 regular tests passed, one optional paired-artifact integration test skipped, and all five packaged-artifact tests passed.
  • Actual dependencies: SimpleAPI 1.0.2-20261019.030111-43 and FoliaLib 0.5.1. The final JAR has 20 FoliaLib classes in one relocated namespace, no original FoliaLib namespace or duplicate ZIP entries, and the corrected AdvancedCore scheduler calls verified with javap.
  • Built artifact: 10,889,226 bytes; SHA-256 7240806ec08ee780645f0470de3968281ebc5898905922040ddd36e652bae32f. Its existing 10 MiB advisory target warning does not fail packaging.

The AdvancedCore candidate used for this check has SHA-256 d578d63af4abd98ada525ca6cc38dd7255092c9361d339e782530a99561ef57c. This fixture correction does not establish a fix for the spectator-mode report. No live server test or dependency publication was performed.

Summary by CodeRabbit

  • Tests
    • Updated automated checks for scheduling, reminders, placeholders, user points, and VoteShop purchases to use the current Folia scheduler interface.
    • The tested scenarios and expected results remain unchanged, including handling of retired entities and fallback callbacks.
    • This update changes test setup only; no end-user features or behavior are affected.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T04:29:08.828582Z cfd4cf5 New commits
🔒 Security Review ✅ Completed 2026-10-19T04:14:11.763610Z 84a8724 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 70bb07e0-6a73-49cb-9a42-2de4736fff84
📥 Commits

Reviewing files that changed from the base of the PR and between 84a8724 and cfd4cf5.

📒 Files selected for processing: 1
  • VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/voteshop/service/VoteShopPurchaseServiceTest.java
🚧 Files skipped from review as they are similar to previous changes: 1
  • VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/voteshop/service/VoteShopPurchaseServiceTest.java

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout: 3
  • GitHub Check: build
  • GitHub Check: Analyze (java-kotlin)
  • GitHub Check: Analyze (actions)
📝 Walkthrough

Seven test files replace ServerImplementation with PlatformScheduler in scheduler mocks, helper signatures, and fixture fields. Existing test behavior and assertions remain unchanged.

Changes: Folia scheduler test updates

Layer / File(s) Summary
Update scheduler mocks and fixtures
VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backgroundtask/VotingPluginBackgroundTaskTest.java, VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/commands/CommandLoaderSchedulingTest.java, VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/placeholders/PlaceHoldersWorkerSafetyTest.java, VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/reminders/VoteRemindersManagerTest.java, VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/user/VotingPluginUserPointSchedulingTest.java, VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/util/BukkitCompletionSchedulerTest.java, VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/voteshop/service/VoteShopPurchaseServiceTest.java
Scheduler mocks, helper signatures, and fixture fields now use PlatformScheduler instead of ServerImplementation. Existing scheduling setup and assertions are unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to cfd4c

This change only updates test fixtures to match the FoliaLib 0.5.1 scheduler type. It does not alter production behavior, and no merge-blocking risk is evident.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 5.26% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: updating FoliaLib scheduler test fixtures to resolve compilation errors.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@BenCodez
BenCodez merged commit 0554c2b into master Oct 19, 2026
6 checks passed
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.

1 participant