Manno15 commented on code in PR #68:
URL: https://github.com/apache/accumulo-proxy/pull/68#discussion_r1089775148
##########
src/test/java/org/apache/accumulo/proxy/its/SimpleProxyBase.java:
##########
@@ -2099,20 +1838,34 @@ public void tableProperties() throws Exception {
client.removeTableProperty(sharedSecret, tableName,
"table.split.threshold");
update = client.getTableProperties(sharedSecret, tableName);
- assertEquals(orig, update);
+
+ var difference = Sets.symmetricDifference(orig.entrySet(),
update.entrySet());
+
+ assertTrue(difference.isEmpty(),
+ "Properties should have been the same. Found difference: " +
difference);
}
@Test
public void tableRenames() throws Exception {
- // rename table
- Map<String,String> tables = client.tableIdMap(sharedSecret);
- client.renameTable(sharedSecret, tableName, "bar");
- Map<String,String> tables2 = client.tableIdMap(sharedSecret);
- assertEquals(tables.get(tableName), tables2.get("bar"));
- // table exists
- assertTrue(client.tableExists(sharedSecret, "bar"));
- assertFalse(client.tableExists(sharedSecret, tableName));
- client.renameTable(sharedSecret, "bar", tableName);
+ final String newTableName = "bar";
+
+ Map<String,String> tableIds = client.tableIdMap(sharedSecret);
+ final String originalTableID = tableIds.get(tableName);
+
+ client.renameTable(sharedSecret, tableName, newTableName);
+
+ tableIds = client.tableIdMap(sharedSecret);
+ final String newTableID = tableIds.get(newTableName);
+
+ assertEquals(originalTableID, newTableID,
+ "Table ID should be the same before and after the table has been
renamed");
+
+ assertTrue(client.tableExists(sharedSecret, newTableName),
+ "Expect to find table with new name");
+ assertFalse(client.tableExists(sharedSecret, tableName),
+ "Do not expect to find table with original name");
Review Comment:
Small nit. I think this should say "Did not expect...". Possible also this
could be improved to be more clear but that is up to you. The message above
could also be rewritten as "Expected...".
--
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]