Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);

}
}

Expand Down