Skip to content

Commit 69240ed

Browse files
committed
Add project id to mock client
1 parent 59c0286 commit 69240ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void setup() throws IOException {
113113
);
114114
ClusterState state = createClusterState(projectId, new PersistentTasksCustomMetadata(1L, Map.of()));
115115
when(clusterService.state()).thenReturn(state);
116-
client = new MockClient(threadPool);
116+
client = new MockClient(threadPool, projectId);
117117
geoIpDownloader = new GeoIpDownloader(
118118
client,
119119
httpClient,
@@ -706,8 +706,8 @@ private static class MockClient extends NoOpClient {
706706

707707
private final Map<ActionType<?>, BiConsumer<? extends ActionRequest, ? extends ActionListener<?>>> handlers = new HashMap<>();
708708

709-
private MockClient(ThreadPool threadPool) {
710-
super(threadPool, TestProjectResolvers.mustExecuteFirst());
709+
private MockClient(ThreadPool threadPool, ProjectId projectId) {
710+
super(threadPool, TestProjectResolvers.singleProject(projectId));
711711
}
712712

713713
public <Response extends ActionResponse, Request extends ActionRequest> void addHandler(

0 commit comments

Comments
 (0)