Skip to content

Commit 25702d7

Browse files
committed
Fix
Signed-off-by: Nils Bandener <nils.bandener@eliatra.com>
1 parent 1b3dc51 commit 25702d7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/workload-management/src/test/java/org/opensearch/plugin/wlm/AutoTaggingActionFilterTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest;
1313
import org.opensearch.action.search.SearchRequest;
1414
import org.opensearch.action.support.ActionFilterChain;
15+
import org.opensearch.action.support.ActionRequestMetadata;
1516
import org.opensearch.common.util.concurrent.ThreadContext;
1617
import org.opensearch.core.action.ActionListener;
1718
import org.opensearch.core.action.ActionResponse;
@@ -70,7 +71,7 @@ public void testApplyForValidRequest() {
7071
when(request.indices()).thenReturn(new String[] { "foo" });
7172
try (ThreadContext.StoredContext context = threadPool.getThreadContext().stashContext()) {
7273
when(ruleProcessingService.evaluateLabel(anyList())).thenReturn(Optional.of("TestQG_ID"));
73-
autoTaggingActionFilter.apply(mock(Task.class), "Test", request, null, mockFilterChain);
74+
autoTaggingActionFilter.apply(mock(Task.class), "Test", request, ActionRequestMetadata.empty(), null, mockFilterChain);
7475

7576
assertEquals("TestQG_ID", threadPool.getThreadContext().getHeader(WorkloadGroupTask.WORKLOAD_GROUP_ID_HEADER));
7677
verify(ruleProcessingService, times(1)).evaluateLabel(anyList());
@@ -80,7 +81,7 @@ public void testApplyForValidRequest() {
8081
public void testApplyForInValidRequest() {
8182
ActionFilterChain<ActionRequest, ActionResponse> mockFilterChain = mock(TestActionFilterChain.class);
8283
CancelTasksRequest request = new CancelTasksRequest();
83-
autoTaggingActionFilter.apply(mock(Task.class), "Test", request, null, mockFilterChain);
84+
autoTaggingActionFilter.apply(mock(Task.class), "Test", request, ActionRequestMetadata.empty(), null, mockFilterChain);
8485

8586
verify(ruleProcessingService, times(0)).evaluateLabel(anyList());
8687
}

0 commit comments

Comments
 (0)