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

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

    [ https://issues.apache.org/jira/browse/IGNITE-19432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17720389#comment-17720389 ] 

Kirill Tkalenko commented on IGNITE-19432:
------------------------------------------

Looks good.

> 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
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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)