You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Roman Puchkovskiy (Jira)" <ji...@apache.org> on 2023/05/05 14:24:00 UTC

[jira] [Created] (IGNITE-19432) Tests in PartitionReplicaListenerTest are not independent

Roman Puchkovskiy created IGNITE-19432:
------------------------------------------

             Summary: Tests in PartitionReplicaListenerTest are not independent
                 Key: IGNITE-19432
                 URL: https://issues.apache.org/jira/browse/IGNITE-19432
             Project: Ignite
          Issue Type: Bug
            Reporter: Roman Puchkovskiy
            Assignee: Roman Puchkovskiy


If test methods execution order is changed, the tests start falling (for instance, this happens if one changes 'Retrive' to 'Retrieve' in method names). This is because test fixtures are static and mocks are not reset between test invocations. This can be fixed by making fixtures non-static (as nothing mandates them to be static) and use Mockito standard features to make the mocks reset properly.

While doing this, we can also clean the code of the class a bit as in IDEA too many warnings are seen.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)