Skip to content

test(#4743): enable tests related to caching for '0.0.0' and 'SNAPSHOT' versions in FpDefaultTest#4768

Merged
yegor256 merged 1 commit into
objectionary:masterfrom
volodya-lombrozo:4743-fpdefaulttest-fix
Dec 18, 2025
Merged

test(#4743): enable tests related to caching for '0.0.0' and 'SNAPSHOT' versions in FpDefaultTest#4768
yegor256 merged 1 commit into
objectionary:masterfrom
volodya-lombrozo:4743-fpdefaulttest-fix

Conversation

@volodya-lombrozo

@volodya-lombrozo volodya-lombrozo commented Dec 18, 2025

Copy link
Copy Markdown
Member

This PR enables the tests in FpDefaultTest that check '0.0.0' and 'SNAPSHOT' values.

Fixes #4743

Summary by CodeRabbit

  • Tests

    • Re-enabled two cache-related tests to restore validation of caching behavior for snapshot and zero-version scenarios, improving coverage and confidence.
  • Chores

    • Removed an outdated multi-line TODO from test documentation to clarify intent and reduce contributor confusion.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings December 18, 2025 14:22
@coderabbitai

coderabbitai Bot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Re-enabled two previously disabled tests in FpDefaultTest, switched their temporary-directory injection from @Mktmp to JUnit's @TempDir, and removed a multi-line TODO Javadoc about caching behavior for SNAPSHOT and 0.0.0 versions.

Changes

Cohort / File(s) Summary
Test updates
eo-maven-plugin/src/test/java/org/eolang/maven/FpDefaultTest.java
Removed @Disabled from usesCacheEvenItIsSnapshot and cachesEvenItIsZeroVersion; replaced @Mktmp parameter annotations with @TempDir and added the org.junit.jupiter.api.io.TempDir import; removed multi-line @todo Javadoc block referencing SNAPSHOT/0.0.0 caching.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Run the two tests to ensure they pass reliably in CI.
  • Verify no remaining TODO/puzzle references or missing imports.

Possibly related PRs

Suggested labels

core

Suggested reviewers

  • yegor256

Poem

🐰 I hopped through tests with eager paws,

Two sleeps undone — I fixed the flaws.
TempDir planted where Mktmp stood,
The TODO folded — all is good.
A tiny hop, a joyful thud.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: enabling previously disabled tests for '0.0.0' and 'SNAPSHOT' version caching in FpDefaultTest, and directly references issue #4743.
Linked Issues check ✅ Passed The PR successfully enables the two disabled tests and replaces @mktmp with @tempdir, fulfilling the primary objective of fixing issue #4743 by removing the puzzle block from the code.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing issue #4743: enabling tests, updating annotations, and removing the puzzle documentation block. No unrelated or out-of-scope modifications are present.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@github-actions

github-actions Bot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

🚀 Performance Analysis

All benchmarks are within the acceptable range. No critical degradation detected (threshold is 100%). Please refer to the detailed report for more information.

Click to see the detailed report
Test Base Score PR Score Change % Change Unit Mode
benchmarks.XmirBench.xmirToEO 190.718 151.584 -39.134 -20.52% ms/op Average Time

✅ Performance gain: benchmarks.XmirBench.xmirToEO is faster by 39.134 ms/op (20.52%)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enables previously disabled tests that verify caching behavior for '0.0.0' and 'SNAPSHOT' versions when a valid hash is provided. The changes remove an outdated @todo comment and enable two test methods by removing their @disabled annotations.

Key Changes:

  • Removed outdated @todo comment referencing issue #4526 about allowing '0.0.0' and 'SNAPSHOT' versions to use cache
  • Enabled usesCacheEvenItIsSnapshot() test that verifies cache usage for SNAPSHOT versions with non-empty hash
  • Enabled cachesEvenItIsZeroVersion() test that verifies cache usage for 0.0.0 versions with non-empty hash

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@volodya-lombrozo
volodya-lombrozo force-pushed the 4743-fpdefaulttest-fix branch 3 times, most recently from 8bc6cdb to c121109 Compare December 18, 2025 15:02
@volodya-lombrozo

Copy link
Copy Markdown
Member Author

@yegor256 could you have a look, please?

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.

FpDefaultTest does not allow '0.0.0' and 'SNAPSHOT' values

3 participants