wForget commented on issue #1063: URL: https://github.com/apache/incubator-linkis/issues/1063#issuecomment-958988873
## Test ### 1. In linkis-engineplugin-shell, add the `TestOperator` to implement the `Operator` interface: ``` class TestOperator extends Operator { override def getName: String = "test" override def apply(): EngineOperateResponse = { val result: Map[String, Any] = Map( "test" -> "testValue" ) EngineOperateResponse(result) } override def init(properties: Map[String, Any]): Unit = { } } ``` ### 2. Client test: ``` val serverUrl = "http://testip:9001" val username = "test" val password = "test" // Suggest to use LinkisJobClient to submit job to Linkis. val clientConfig = DWSClientConfigBuilder.newBuilder().addServerUrl(serverUrl) .connectionTimeout(30000).discoveryEnabled(true) .discoveryFrequency(1, TimeUnit.MINUTES) .loadbalancerEnabled(true).maxConnectionSize(5) .retryEnabled(false).readTimeout(30000) .setAuthenticationStrategy(new StaticAuthenticationStrategy()) .setAuthTokenKey(username) .setAuthTokenValue(password).setDWSVersion("v1").build() val client = UJESClient(clientConfig) val managerClient = LinkisManagerClient(client) val engineConnInstance = "engineconnIp:11635" val engineOperateAction = EngineOperateAction.newBuilder() .operatorName("test") .setUser(username) .setApplicationName("linkis-cg-engineconn") .setInstance(engineConnInstance) .build() val result = managerClient.executeEngineOperation(engineOperateAction) println(result.getResult) ``` output: ``` {test=testValue} ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@linkis.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@linkis.apache.org For additional commands, e-mail: dev-h...@linkis.apache.org