wuchong commented on code in PR #19849:
URL: https://github.com/apache/flink/pull/19849#discussion_r913847524


##########
flink-table/flink-sql-gateway-api/src/test/java/org/apache/flink/table/gateway/api/utils/MockedSqlGatewayEndpointFactory.java:
##########
@@ -41,12 +40,14 @@ public class MockedSqlGatewayEndpointFactory implements 
SqlGatewayEndpointFactor
 
     @Override
     public SqlGatewayEndpoint createSqlGatewayEndpoint(Context context) {
-        ReadableConfig config = context.getConfiguration();
-        
SqlGatewayEndpointFactoryUtils.createSqlGatewayEndpointFactoryHelper(this, 
context)
-                .validate();
+        SqlGatewayEndpointFactoryUtils.EndpointFactoryHelper helper =
+                
SqlGatewayEndpointFactoryUtils.createEndpointFactoryHelper(this, context);
+        helper.validate();
 
         return new MockedSqlGatewayEndpoint(
-                config.get(HOST), config.get(PORT), 
config.getOptional(DESCRIPTION).orElse(null));
+                helper.getOptions().get(HOST),
+                helper.getOptions().get(PORT),
+                helper.getOptions().getOptional(DESCRIPTION).orElse(null));

Review Comment:
   minor: should be `helper.getOptions().get(DESCRIPTION)` to use default value 
if not present. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to