From 9c5df8df7c99d95190591adacf816b86159723de Mon Sep 17 00:00:00 2001 From: sureshms Date: Mon, 4 Oct 2021 09:49:01 -0700 Subject: [PATCH] Fix #656 jdbcConnection.json connectionURL field does not accept valid string --- .../main/resources/json/schema/type/jdbcConnection.json | 5 ++--- .../java/org/openmetadata/catalog/util/TestUtils.java | 8 ++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/catalog-rest-service/src/main/resources/json/schema/type/jdbcConnection.json b/catalog-rest-service/src/main/resources/json/schema/type/jdbcConnection.json index b135150ee15..4d61f8028d3 100644 --- a/catalog-rest-service/src/main/resources/json/schema/type/jdbcConnection.json +++ b/catalog-rest-service/src/main/resources/json/schema/type/jdbcConnection.json @@ -11,9 +11,8 @@ "type": "string" }, "connectionUrl": { - "description": "Type used for JDBC connection URL.", - "type": "string", - "format": "uri" + "description": "Type used for JDBC connection URL of format `url_scheme://:@:/`.", + "type": "string" }, "jdbcInfo": { diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/util/TestUtils.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/util/TestUtils.java index bbe184b4c9a..f32d18c04b2 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/util/TestUtils.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/util/TestUtils.java @@ -58,12 +58,8 @@ public final class TestUtils { public static URI PIPELINE_URL; static { - try { - JDBC_INFO = new JdbcInfo().withConnectionUrl(new URI("jdbc:service://")).withDriverClass("driverClass"); - } catch (URISyntaxException e) { - JDBC_INFO = null; - e.printStackTrace(); - } + JDBC_INFO = new JdbcInfo().withConnectionUrl("scheme://user_name:password#_@%:localhost:1000/test") + .withDriverClass("driverClass"); } static {