Skip to content

Failing unit tests in Feign core #2752

Closed

Description

@trumpetinc

I'm running Feign Core unit tests on Windows platform, Java SE 21 (OpenJDK) and finding test failures.

These two appear to be actual functional problems:

  1. feign.DefaultContractInheritanceTest.overrideParameterizedApiSupported()
  2. feign.DefaultContractInheritanceTest.multipleInheritanceDoneCorrectly2()

Both failures look like this:

java.lang.IllegalStateException: Method OverrideParameterizedApi#get(String) not annotated with HTTP method type (ex. GET, POST)
Warnings:

  • Class OverrideParameterizedApi has no annotations, it may affect contract Default
    at feign.Util.checkState(Util.java:121)
    at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:117)
    at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:71)
    at feign.DeclarativeContract.parseAndValidateMetadata(DeclarativeContract.java:40)
    at feign.DefaultContractInheritanceTest.overrideParameterizedApiSupported(DefaultContractInheritanceTest.java:88)
    at java.base/java.lang.reflect.Method.invoke(Method.java:580)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

Less important, but all 3 tests in this test unit are failing:

  1. feign.MultipleLoggerTest

Failure is: org.junit.platform.commons.JUnitException: Failed to close extension context

I believe that these 3 failures are because JUL is grabbing file locks, which prevents JUnit from cleaning up it's temp folders under Windows. One solution would be to add a close() method to JavaLogger...

Activity

  1. added
    bug
    on Jun 19, 2026
  2. velo commented on Jun 19, 2026

    @velo
    Member

    Thanks for the Windows-specific test report. The DefaultContractInheritanceTest failures on Java 21/Windows and the JUL file-locking behavior around MultipleLoggerTest both look worth fixing, so I marked this as a bug.

    The path I'd welcome here is a focused PR with tests or build adjustments that make these pass on Windows without weakening the existing contract behavior. I'll review that when it's up; if you'd rather sponsor/commission the fix, I'm also available through GitHub Sponsors: https://github.com/sponsors/velo.

  3. trumpetinc commented on Jul 27, 2026

    @trumpetinc
    CollaboratorAuthor

    @velo I created a PR for fix to the JUL file locking issue. #3493

  4. trumpetinc commented on Jul 27, 2026

    @trumpetinc
    CollaboratorAuthor

    These two issues from this ticket are still outstanding:

    feign.DefaultContractInheritanceTest.overrideParameterizedApiSupported()
    feign.DefaultContractInheritanceTest.multipleInheritanceDoneCorrectly2()

  5. AzazelSensei commented on Aug 12, 2026

    @AzazelSensei
    Contributor

    Happy to pick up the remaining inheritance failures — planning to skip synthetic/bridge methods in BaseContract parsing so the existing DefaultContractInheritanceTest cases pass.

  6. added a commit that references this issue on Aug 20, 2026
    75b7fd3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions