From 810ca8063fcecda33717fdf1b3f41eb4f5f59261 Mon Sep 17 00:00:00 2001 From: Keith Turner Date: Sat, 21 Mar 2026 21:54:09 +0000 Subject: [PATCH] fixes resource group IT Resource group IT had two test that used the same resource group names and could see each others property changes. One of the test was recently and changed and this caused the other test to break. Modified the test to use unique names. --- .../test/conf/ResourceGroupConfigIT.java | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/test/src/main/java/org/apache/accumulo/test/conf/ResourceGroupConfigIT.java b/test/src/main/java/org/apache/accumulo/test/conf/ResourceGroupConfigIT.java index 4448c0dfed3..61340af1d74 100644 --- a/test/src/main/java/org/apache/accumulo/test/conf/ResourceGroupConfigIT.java +++ b/test/src/main/java/org/apache/accumulo/test/conf/ResourceGroupConfigIT.java @@ -321,9 +321,9 @@ public void testPermissions() throws Exception { @Test public void testMultipleProperties() throws Exception { - final String FIRST = "FIRST"; - final String SECOND = "SECOND"; - final String THIRD = "THIRD"; + final String FIRST = "FIRST_MP"; + final String SECOND = "SECOND_MP"; + final String THIRD = "THIRD_MP"; final ResourceGroupId first = ResourceGroupId.of(FIRST); final ResourceGroupId second = ResourceGroupId.of(SECOND); @@ -356,6 +356,10 @@ public void testMultipleProperties() throws Exception { rgops.create(second); rgops.create(third); + assertEquals(Map.of(), rgops.getProperties(first)); + assertEquals(Map.of(), rgops.getProperties(second)); + assertEquals(Map.of(), rgops.getProperties(third)); + rgops.modifyProperties(first, (map) -> map.putAll(firstProps)); rgops.modifyProperties(second, (map) -> map.putAll(secondProps)); rgops.modifyProperties(third, (map) -> map.putAll(thirdProps)); @@ -381,15 +385,18 @@ public void testMultipleProperties() throws Exception { assertEquals(defaultProps, rgops.getProperties(ResourceGroupId.DEFAULT)); assertThrows(ResourceGroupNotFoundException.class, ()->rgops.getProperties(third)); assertEquals(Set.of(ResourceGroupId.DEFAULT, first, second), rgops.list()); + + rgops.remove(first); + rgops.remove(second); } } @Test public void testMultipleConfigurations() throws Exception { - final String FIRST = "FIRST"; - final String SECOND = "SECOND"; - final String THIRD = "THIRD"; + final String FIRST = "FIRST_MC"; + final String SECOND = "SECOND_MC"; + final String THIRD = "THIRD_MC"; final ResourceGroupId first = ResourceGroupId.of(FIRST); final ResourceGroupId second = ResourceGroupId.of(SECOND); @@ -436,6 +443,10 @@ public void testMultipleConfigurations() throws Exception { rgops.create(second); rgops.create(third); + assertEquals(Map.of(), rgops.getProperties(first)); + assertEquals(Map.of(), rgops.getProperties(second)); + assertEquals(Map.of(), rgops.getProperties(third)); + getCluster().getConfig().getClusterServerConfiguration().setNumDefaultCompactors(1); getCluster().getConfig().getClusterServerConfiguration().addCompactorResourceGroup(FIRST, 1); getCluster().getConfig().getClusterServerConfiguration().addCompactorResourceGroup(SECOND, 1); @@ -497,6 +508,11 @@ public void testMultipleConfigurations() throws Exception { Wait.waitFor(() -> cc.getServerPaths() .getTabletServer(ResourceGroupPredicate.exact(third), AddressSelector.all(), true).size() == 0); + + rgops.remove(first); + rgops.remove(second); + rgops.remove(third); + } }