Skip to content

Mock method invocation expected 1 invocation, actual 2 invocations #59

Description

@MosheElisha

After upgrading from pitest-junit5-plugin 0.10 to 0.11, a unit test started failing.
The same problem occurs in 0.14 as well.

java.lang.AssertionError:
  Unexpected method
3:00:41 PM PIT >> INFO : MINION : call PrometheusScrapeEndpoint.scrape([]):
    PrometheusScrapeEndpoint.scrape(<any>): expected: 1, actual: 2

EasyMock expected that PrometheusScrapeEndpoint.scrape(<any>) will be invoked only once but it was invoked twice.
When I execute maven with -DskipPitest, all tests pass successfully.

The following ZIP contains maven output with verbose=true for

mvn.pitest-junit5-plugin-0.10.out - pass
mvn.pitest-junit5-plugin-0.11.out - fail
mvn.pitest-junit5-plugin-0.14.out - fail

mvn-out.zip

pitest-maven = 1.6.2
junit-jupiter-api = 5.7.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions