Thanks to visit codestin.com
Credit goes to github.com

Skip to content

refactor(#4862): remove unnecessary FpDefault references from tests#4865

Merged
yegor256 merged 1 commit into
objectionary:masterfrom
volodya-lombrozo:4862-remove-fpdefault
Feb 9, 2026
Merged

refactor(#4862): remove unnecessary FpDefault references from tests#4865
yegor256 merged 1 commit into
objectionary:masterfrom
volodya-lombrozo:4862-remove-fpdefault

Conversation

@volodya-lombrozo
Copy link
Copy Markdown
Member

@volodya-lombrozo volodya-lombrozo commented Feb 6, 2026

This PR removes unnecessary references to FpDefault in the eo-maven-plugin code.
I don't remove all of them because we have a limit in 200 lines. The next tests will be removed in following PRs.

Related to #4862

Summary by CodeRabbit

  • Tests
    • Consolidated the test suite by removing redundant scenarios and helper utilities.
    • Retained a single core test to validate cache/footprint behavior.

Copilot AI review requested due to automatic review settings February 6, 2026 10:46
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

This PR removes most tests from FpDefaultTest.java, leaving a single cache-copy test (copiesFromCacheIfNoTaretAndExistedCacheableCacheOlder) and deletes several helper/test scenarios related to cache and footprint behavior.

Changes

Cohort / File(s) Summary
Test Case Removal
eo-maven-plugin/src/test/java/org/eolang/maven/FpDefaultTest.java
Removed ~189 lines of test code: multiple cache/footprint/time-based scenarios and helper method existedTarget were deleted; retained only copiesFromCacheIfNoTaretAndExistedCacheableCacheOlder.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

core

Suggested reviewers

  • yegor256

Poem

🐰 I nibbled tests down to one small bite,
A single check beneath the moonlight,
Cache whispers softly, time keeps score,
One tidy test and less to explore. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing unnecessary FpDefault references from tests by deleting 189 lines of test code from FpDefaultTest.java.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 6, 2026

🚀 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 183.162 201.007 17.845 9.74% ms/op Average Time

⚠️ Performance loss: benchmarks.XmirBench.xmirToEO is slower by 17.845 ms/op (9.74%)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 is part of an ongoing effort to remove the FpDefault class from the codebase (issue #4862). Since FpDefault is only used in tests and is a composition of other Fp* classes that have their own tests, the project is gradually removing FpDefault tests in batches due to a 200-line limit per PR.

Changes:

  • Removed 9 test methods from FpDefaultTest.java that test various scenarios of FpDefault behavior
  • Kept 6 test methods that still use FpDefault for removal in subsequent PRs

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

}

@Test
void copiesFromCacheIfNoTaretAndExistedCacheableCacheOlder(
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The test method name contains a typo: "Taret" should be "Target". This typo existed before this PR, but since the line is now adjacent to the diff (due to removed code above it), it should be corrected for consistency.

Suggested change
void copiesFromCacheIfNoTaretAndExistedCacheableCacheOlder(
void copiesFromCacheIfNoTargetAndExistedCacheableCacheOlder(

Copilot uses AI. Check for mistakes.
@volodya-lombrozo
Copy link
Copy Markdown
Member Author

@yegor256 could you have a look, please?

@volodya-lombrozo
Copy link
Copy Markdown
Member Author

@yegor256 friendly reminder

@yegor256 yegor256 merged commit 84b3969 into objectionary:master Feb 9, 2026
26 checks passed
@0crat
Copy link
Copy Markdown

0crat commented Feb 9, 2026

@volodya-lombrozo Thanks for the contribution! You've earned +12 points for this: +16 as a basis, +9.45 for your 189 hits-of-code (189 × 0.05), but -4 deducted since you exceeded 100 hits-of-code, and -9.45 to cap the hit-of-code bonus at 16 points maximum. According to our policy, contributions over 100 hits-of-code get penalized to encourage smaller, more focused changes that are easier to review and maintain. Please keep them coming, but consider breaking larger contributions into smaller chunks! 🎯 Your running score is +402; don't forget to check your Zerocracy account too.

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.

4 participants