MaxGekk opened a new pull request #26377: [SPARK-29733][TEST] Fix wrong order 
of parameters passed to `assertEquals`
URL: https://github.com/apache/spark/pull/26377
 
 
   ### What changes were proposed in this pull request?
   The `assertEquals` method of JUnit Assert requires the first parameter to be 
the expected value. In this PR, I propose to change the order of parameters 
when the expected value is passed as the second parameter.
   
   ### Why are the changes needed?
   Wrong order of assert parameters confuses when the assert fails and the 
parameters have special string representation. For example:
   ```java
   assertEquals(input1.add(input2), new CalendarInterval(5, 5, 367200000000L));
   ```
   ```
   java.lang.AssertionError: 
   Expected :interval 5 months 5 days 101 hours
   Actual   :interval 5 months 5 days 102 hours
   ```
   
   ### Does this PR introduce any user-facing change?
   No
   
   ### How was this patch tested?
   By existing tests.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to