Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <[email protected]>
  • Loading branch information
dbwiddis committed Aug 25, 2022
1 parent 7ade781 commit ca5a29d
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,8 @@ public void testGetNamedWriteables() throws Exception {
"OpenSearchRequest failed"
)
);

extensionsOrchestrator.namedWriteableRegistry = new ExtensionNamedWriteableRegistry(
extensionsOrchestrator.extensionsInitializedList,
transportService
);
List<DiscoveryExtension> extensionsList = new ArrayList<>(extensionsOrchestrator.extensionIdMap.values());
extensionsOrchestrator.namedWriteableRegistry = new ExtensionNamedWriteableRegistry(extensionsList, transportService);
extensionsOrchestrator.namedWriteableRegistry.getNamedWriteables();
mockLogAppender.assertAllExpectationsMatched();
}
Expand All @@ -482,7 +479,8 @@ public void testNamedWriteableRegistryResponseHandler() throws Exception {
transportService.acceptIncomingRequests();
extensionsOrchestrator.initializeServicesAndRestHandler(restController, transportService, clusterService);

DiscoveryNode extensionNode = extensionsOrchestrator.extensionsInitializedList.get(0);
List<DiscoveryExtension> extensionsList = new ArrayList<>(extensionsOrchestrator.extensionIdMap.values());
DiscoveryNode extensionNode = extensionsList.get(0);
String requestType = ExtensionsOrchestrator.REQUEST_OPENSEARCH_NAMED_WRITEABLE_REGISTRY;

// Create response to pass to response handler
Expand Down Expand Up @@ -535,7 +533,8 @@ public void testParseNamedWriteables() throws Exception {
extensionsOrchestrator.initializeServicesAndRestHandler(restController, transportService, clusterService);

String requestType = ExtensionsOrchestrator.REQUEST_OPENSEARCH_PARSE_NAMED_WRITEABLE;
DiscoveryNode extensionNode = extensionsOrchestrator.extensionsInitializedList.get(0);
List<DiscoveryExtension> extensionsList = new ArrayList<>(extensionsOrchestrator.extensionIdMap.values());
DiscoveryNode extensionNode = extensionsList.get(0);
Class categoryClass = Example.class;

// convert context into an input stream then stream input for mock
Expand Down

0 comments on commit ca5a29d

Please sign in to comment.