steveloughran commented on code in PR #5308:
URL: https://github.com/apache/hadoop/pull/5308#discussion_r1101279463
##########
hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/mapred/TestCopyCommitter.java:
##########
@@ -562,11 +562,12 @@ private void testCommitWithChecksumMismatch(boolean
skipCrc)
Path sourcePath = new Path(sourceBase + srcFilename);
CopyListingFileStatus sourceCurrStatus =
new CopyListingFileStatus(fs.getFileStatus(sourcePath));
- Assert.assertFalse(!DistCpUtils.checksumsAreEqual(
- fs, new Path(sourceBase + srcFilename), null,
- fs, new Path(targetBase + srcFilename),
- sourceCurrStatus.getLen())
- .equals(CopyMapper.ChecksumComparison.FALSE));
+ Assert.assertEquals("Checksum should not be equal",
+ DistCpUtils.checksumsAreEqual(
+ fs, new Path(sourceBase + srcFilename), null,
+ fs, new Path(targetBase + srcFilename),
+ sourceCurrStatus.getLen()),
+ CopyMapper.ChecksumComparison.FALSE);
Review Comment:
good test, but you need to put the expected value first, so that
assertEquals prints the right "expected 1 actual 2" message. bit of PITA
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]