Skip to content

Commit f5ddae6

Browse files
improve code quality by addressing TODO comments
1 parent 89bbae8 commit f5ddae6

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

gateway-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsJdbcMonitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ public ClusterStats monitor(ProxyBackendConfiguration backend)
7878
properties.setProperty("SSL", String.valueOf(parsedUrl.getProtocol().equals("https")));
7979
}
8080
catch (MalformedURLException e) {
81-
log.error("could not parse backend url %s ", url);
82-
return clusterStats.build(); // TODO Invalid configuration should fail
81+
log.error("Invalid backend URL configuration: %s", url);
82+
throw new IllegalArgumentException("Invalid backend URL: " + url, e);
8383
}
8484

8585
try (Connection conn = DriverManager.getConnection(jdbcUrl, properties);

gateway-ha/src/test/java/io/trino/gateway/ha/security/TestOIDC.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import com.fasterxml.jackson.databind.JsonNode;
1818
import com.fasterxml.jackson.databind.ObjectMapper;
1919
import com.google.common.collect.ImmutableMap;
20+
import io.airlift.log.Logger;
2021
import io.trino.gateway.ha.HaGatewayLauncher;
2122
import io.trino.gateway.ha.HaGatewayTestUtils;
2223
import okhttp3.Cookie;
@@ -62,6 +63,8 @@
6263
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
6364
final class TestOIDC
6465
{
66+
private static final Logger log = Logger.get(TestOIDC.class);
67+
6568
private static final int TTL_ACCESS_TOKEN_IN_SECONDS = 5;
6669
private static final int TTL_REFRESH_TOKEN_IN_SECONDS = 15;
6770

@@ -158,7 +161,7 @@ void setup()
158161
File testConfigFile =
159162
HaGatewayTestUtils.buildGatewayConfig("auth/oauth-test-config.yml", additionalVars);
160163
String[] args = {testConfigFile.getAbsolutePath()};
161-
System.out.println(ROUTER_PORT);
164+
log.info("Starting gateway on port: %d", ROUTER_PORT);
162165
HaGatewayLauncher.main(args);
163166
}
164167

0 commit comments

Comments
 (0)