Skip to content

Commit

Permalink
mock ThreadPool in RestSendToExtensionActionTests
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Aug 16, 2024
1 parent efac919 commit 1536380
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public void setup() throws Exception {
);
SettingsModule settingsModule = new SettingsModule(settings);
UsageService usageService = new UsageService();
TestThreadPool threadPool = new TestThreadPool(getTestName());
actionModule = new ActionModule(
settingsModule.getSettings(),
new IndexNameExpressionResolver(new ThreadContext(Settings.EMPTY)),
Expand All @@ -123,10 +122,10 @@ public void setup() throws Exception {
null,
usageService,
null,
new IdentityService(Settings.EMPTY, threadPool, new ArrayList<>()),
new ExtensionsManager(Set.of(), new IdentityService(Settings.EMPTY, threadPool, List.of()))
new IdentityService(Settings.EMPTY, mock(ThreadPool.class), new ArrayList<>()),
new ExtensionsManager(Set.of(), new IdentityService(Settings.EMPTY, mock(ThreadPool.class), List.of()))
);
identityService = new IdentityService(Settings.EMPTY, threadPool, new ArrayList<>());
identityService = new IdentityService(Settings.EMPTY, mock(ThreadPool.class), new ArrayList<>());
dynamicActionRegistry = actionModule.getDynamicActionRegistry();
}

Expand Down

0 comments on commit 1536380

Please sign in to comment.