Skip to content

Commit

Permalink
Removed static extension name
Browse files Browse the repository at this point in the history
Signed-off-by: Owais Kazi <[email protected]>
  • Loading branch information
owaiskazi19 committed Jul 15, 2022
1 parent cae2490 commit 8ea76c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/opensearch/sdk/ExtensionsRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public DiscoveryNode getOpensearchNode() {
*/
PluginResponse handlePluginsRequest(PluginRequest pluginRequest) {
logger.info("Registering Plugin Request received from OpenSearch");
PluginResponse pluginResponse = new PluginResponse("RealExtension");
PluginResponse pluginResponse = new PluginResponse(extensionSettings.getExtensionName());
opensearchNode = pluginRequest.getSourceNode();
setOpensearchNode(opensearchNode);
return pluginResponse;
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/opensearch/sdk/TestExtensionsRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void testHandlePluginsRequest() throws UnknownHostException {
);
PluginRequest pluginRequest = new PluginRequest(sourceNode, null);
PluginResponse response = extensionsRunner.handlePluginsRequest(pluginRequest);
assertEquals(response.getName(), "RealExtension");
assertEquals(response.getName(), "extension");

// Test if the source node is set after handlePluginRequest() is called during OpenSearch bootstrap
assertEquals(extensionsRunner.getOpensearchNode(), sourceNode);
Expand Down

0 comments on commit 8ea76c8

Please sign in to comment.