cshannon commented on code in PR #3135:
URL: https://github.com/apache/accumulo/pull/3135#discussion_r1051623111


##########
test/src/main/java/org/apache/accumulo/test/upgrade/ConfigPropertyUpgraderIT.java:
##########
@@ -62,13 +65,35 @@ public class ConfigPropertyUpgraderIT {
   private static ZooKeeper zooKeeper;
   private static ZooReaderWriter zrw;
 
+  // Create legacy renamer for this test
+  private static final DeprecatedPropertyUtil.PropertyRenamer 
MASTER_MANAGER_RENAMER =
+      DeprecatedPropertyUtil.PropertyRenamer.renamePrefix("master.",
+          Property.MANAGER_PREFIX.getKey());
+  private static List<DeprecatedPropertyUtil.PropertyRenamer> renamers;
+
   private InstanceId instanceId = null;
 
   @TempDir
   private static File tempDir;
 
+  static {
+    try {
+      // Make the renamers list visible to be modified
+      final Field renamersField = 
DeprecatedPropertyUtil.class.getDeclaredField("renamers");
+      renamersField.setAccessible(true);
+      @SuppressWarnings("unchecked")
+      List<DeprecatedPropertyUtil.PropertyRenamer> renamers = (List<
+          DeprecatedPropertyUtil.PropertyRenamer>) 
renamersField.get(DeprecatedPropertyUtil.class);
+      ConfigPropertyUpgraderIT.renamers = renamers;
+    } catch (Exception e) {
+      throw new RuntimeException(e);
+    }
+  }

Review Comment:
   Nevermind, I'm just going to go with your original idea to add a method to 
get the list so it's visible as adding another util method doesn't help since 
the upgrader logic won't ever call it.



-- 
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]

Reply via email to