From d739266f7a7310e86f3df761f482e8199ffcc9f8 Mon Sep 17 00:00:00 2001 From: Rajeshwar Date: Sat, 21 Oct 2023 22:20:00 +0530 Subject: [PATCH 1/2] Adding Unit Test for NewDatabaseMetaDataNode#getDataSourceNodeVersionsNode --- .../metadata/persist/node/NewDatabaseMetaDataNodeTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/metadata/core/src/test/java/org/apache/shardingsphere/metadata/persist/node/NewDatabaseMetaDataNodeTest.java b/kernel/metadata/core/src/test/java/org/apache/shardingsphere/metadata/persist/node/NewDatabaseMetaDataNodeTest.java index f8b24aac7646f..be21ac4ebe970 100644 --- a/kernel/metadata/core/src/test/java/org/apache/shardingsphere/metadata/persist/node/NewDatabaseMetaDataNodeTest.java +++ b/kernel/metadata/core/src/test/java/org/apache/shardingsphere/metadata/persist/node/NewDatabaseMetaDataNodeTest.java @@ -187,4 +187,9 @@ void assertGetViewVersionNode() { void assertGetViewNode() { assertThat(NewDatabaseMetaDataNode.getViewNode("foo_db", "foo_schema", "foo_view"), is("/metadata/foo_db/schemas/foo_schema/views/foo_view")); } + + @Test + void assertGetDataSourceNodeVersionsNode() { + assertThat(NewDatabaseMetaDataNode.getDataSourceNodeVersionsNode("foo_db", "foo_ds"), is("/metadata/foo_db/data_sources/nodes/foo_ds/versions")); + } } From eedebdc1e406047ba83fdf82f7e411cd5df2a508 Mon Sep 17 00:00:00 2001 From: Rajeshwar Date: Sun, 22 Oct 2023 12:07:25 +0530 Subject: [PATCH 2/2] Fixing spotless violations introducd with newly added test --- .../metadata/persist/node/NewDatabaseMetaDataNodeTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/metadata/core/src/test/java/org/apache/shardingsphere/metadata/persist/node/NewDatabaseMetaDataNodeTest.java b/kernel/metadata/core/src/test/java/org/apache/shardingsphere/metadata/persist/node/NewDatabaseMetaDataNodeTest.java index be21ac4ebe970..4ea5203b9731e 100644 --- a/kernel/metadata/core/src/test/java/org/apache/shardingsphere/metadata/persist/node/NewDatabaseMetaDataNodeTest.java +++ b/kernel/metadata/core/src/test/java/org/apache/shardingsphere/metadata/persist/node/NewDatabaseMetaDataNodeTest.java @@ -187,7 +187,7 @@ void assertGetViewVersionNode() { void assertGetViewNode() { assertThat(NewDatabaseMetaDataNode.getViewNode("foo_db", "foo_schema", "foo_view"), is("/metadata/foo_db/schemas/foo_schema/views/foo_view")); } - + @Test void assertGetDataSourceNodeVersionsNode() { assertThat(NewDatabaseMetaDataNode.getDataSourceNodeVersionsNode("foo_db", "foo_ds"), is("/metadata/foo_db/data_sources/nodes/foo_ds/versions"));