瀏覽代碼

Expose server process to server cli subclasses (#107729)

This commit gives protected access to subclasses of ServerCli (ie for
tests or serverless).
Ryan Ernst 1 年之前
父節點
當前提交
7402f93839

+ 5 - 0
distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/ServerCli.java

@@ -237,6 +237,11 @@ class ServerCli extends EnvironmentAwareCommand {
         }
     }
 
+    // allow subclasses to access the started process
+    protected ServerProcess getServer() {
+        return server;
+    }
+
     // protected to allow tests to override
     protected Command loadTool(String toolname, String libs) {
         return CliToolProvider.load(toolname, libs).create();