ctubbsii commented on code in PR #4071:
URL: https://github.com/apache/accumulo/pull/4071#discussion_r1426065672
##########
core/src/test/java/org/apache/accumulo/core/tabletserver/log/LogEntryTest.java:
##########
@@ -55,17 +55,15 @@ public void test() throws Exception {
assertEquals(validFilename, one.getFilePath());
assertEquals(new Text("-/" + validFilename), one.getColumnQualifier());
assertEquals(validUUID.toString(), one.getUniqueID());
- assertEquals(new Value(validFilename), one.getValue());
// test from metadata entry
LogEntry two = LogEntry.fromMetaWalEntry(new
AbstractMap.SimpleImmutableEntry<>(
- new Key(new Text("1<"), new Text("log"), one.getColumnQualifier()),
one.getValue()));
+ new Key(new Text("1<"), new Text("log"), one.getColumnQualifier()),
new Value("unused")));
Review Comment:
The first group of tests verifies that the value stored is what is expected.
The second group of tests ensures that the deserialization from a metadata
entry preserves all the relevant data that was serialized... it doesn't matter
what it originally was at that point. This improved upon previous tests that
were very unclear about what they were even trying to test. I think there's
room for further improvement, but as a follow-on.
--
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]