nikam14 commented on issue #21535:
URL: https://github.com/apache/pulsar/issues/21535#issuecomment-2003184510
In the Test revalidateLeaderWithinSameSession() it is calling
assertEqualsAndRetry() method in which it is using Lambda Expression. There it
is calling the actual.get() method two times.
First at line no. - 130
` if (actual.get().equals(expectedAndRetry)) {`
Second at line no. - 133
` assertEquals(actual.get(), expected);`
Here we are calling the Object twice. Calling actual.get() method twice
which may return different object at both times. Instead we can call it once
store it and check both the conditions . In this way at both conditions we are
checking the same Object.
We can change this to

this

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]