Skip to content
Merged
Changes from 1 commit
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 @@ -59,12 +59,12 @@ public void testDeleteNonExisting() throws Exception {
var projects = randomList(1, 5, ESTestCase::randomUniqueProjectId);
var deletedProjects = randomSubsetOf(projects);
var state = buildState(projects);
var listener = ActionListener.assertAtLeastOnce(
ActionTestUtils.<AcknowledgedResponse>assertNoSuccessListener(e -> assertTrue(e instanceof IllegalArgumentException))
);
var listener = ActionListener.assertAtLeastOnce(ActionTestUtils.<AcknowledgedResponse>assertNoSuccessListener(e -> {
assertTrue(e instanceof IllegalArgumentException);
}));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I don't think these lines need to be changed - changing the parameter to a lambda block seems redundant.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah you are right. It was unintentional. Pushed 2716157

var nonExistingTask = createTask(randomUniqueProjectId(), listener);
var tasks = Stream.concat(Stream.of(nonExistingTask), deletedProjects.stream().map(this::createTask)).toList();
var result = ClusterStateTaskExecutorUtils.executeIgnoringFailures(state, executor, tasks);
var result = ClusterStateTaskExecutorUtils.executeHandlingResults(state, executor, tasks, t -> {}, DeleteProjectTask::onFailure);
for (ProjectId deletedProject : deletedProjects) {
assertNull(result.metadata().projects().get(deletedProject));
assertNull(result.globalRoutingTable().routingTables().get(deletedProject));
Expand Down