This is an automated email from the ASF dual-hosted git repository. zhangliang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push: new b14095ed973 Add more test cases on VersionNodePathParser (#34915) b14095ed973 is described below commit b14095ed97366e85344bea7603c6d71082924363 Author: Liang Zhang <zhangli...@apache.org> AuthorDate: Fri Mar 7 15:35:24 2025 +0800 Add more test cases on VersionNodePathParser (#34915) * Add more test cases on VersionNodePathParser * Add more test cases on VersionNodePathParser --- .../mode/node/path/version/VersionNodePathParserTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mode/node/src/test/java/org/apache/shardingsphere/mode/node/path/version/VersionNodePathParserTest.java b/mode/node/src/test/java/org/apache/shardingsphere/mode/node/path/version/VersionNodePathParserTest.java index b39a256b71d..93633fb32eb 100644 --- a/mode/node/src/test/java/org/apache/shardingsphere/mode/node/path/version/VersionNodePathParserTest.java +++ b/mode/node/src/test/java/org/apache/shardingsphere/mode/node/path/version/VersionNodePathParserTest.java @@ -21,6 +21,7 @@ import org.apache.shardingsphere.mode.node.path.engine.searcher.NodePathPattern; import org.apache.shardingsphere.mode.node.path.type.database.metadata.schema.TableMetadataNodePath; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; class VersionNodePathParserTest { @@ -31,4 +32,11 @@ class VersionNodePathParserTest { void assertIsActiveVersionPath() { assertTrue(parser.isActiveVersionPath("/metadata/foo_db/schemas/foo_schema/tables/foo_tbl/active_version")); } + + @Test + void assertIsNotActiveVersionPath() { + assertFalse(parser.isActiveVersionPath("/metadata/foo_db/schemas/foo_schema/tables/foo_tbl/versions/0")); + assertFalse(parser.isActiveVersionPath("/metadata/foo_db/schemas/foo_schema/tables/foo_tbl")); + assertFalse(parser.isActiveVersionPath("/metadata/bar_db/schemas/foo_schema/tables/foo_tbl/active_version")); + } }