[ 
https://issues.apache.org/jira/browse/HDDS-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Attila Doroszlai resolved HDDS-8675.
------------------------------------
    Fix Version/s: 1.4.0
       Resolution: Fixed

> Fix expectation in testUnderRepSentToOverRepHandlerIfNoNewNodes
> ---------------------------------------------------------------
>
>                 Key: HDDS-8675
>                 URL: https://issues.apache.org/jira/browse/HDDS-8675
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: SCM
>            Reporter: Siddhant Sangwan
>            Assignee: Siddhant Sangwan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.4.0
>
>
> Looks like we're writing the expected result into the actual result and 
> comparing them:
> {code}
>       Set<Pair<DatanodeDetails, SCMCommand<?>>> expectedDelete =
>           new HashSet<>();
>       expectedDelete.add(Pair.of(overRepReplica.getDatanodeDetails(),
>           createDeleteContainerCommand(container,
>               overRepReplica.getReplicaIndex())));
>       Mockito.when(replicationManager.processOverReplicatedContainer(
>           underRep)).thenAnswer(invocationOnMock -> {
>             commandsSent.addAll(expectedDelete);
>             return expectedDelete.size();
>           });
>       commandsSent.clear();
>       assertThrows(SCMException.class,
>           () -> ecURH.processAndSendCommands(availableReplicas,
>               Collections.emptyList(), underRep, 2));
>       Mockito.verify(replicationManager, times(1))
>           .processOverReplicatedContainer(underRep);
>       Assertions.assertEquals(true, expectedDelete.equals(commandsSent));
> {code}
> {{commandsSent}} should be populated with the actual command that was sent.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to