yx9o commented on a change in pull request #16524:
URL: https://github.com/apache/shardingsphere/pull/16524#discussion_r840187959
##########
File path:
shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/service/impl/SchemaRulePersistServiceTest.java
##########
@@ -56,6 +56,15 @@ public void assertLoadWithExistedNode() {
assertThat(actual.size(), is(1));
}
+ @Test
+ public void assertIsExisted() {
+
when(repository.get("/metadata/foo_db/foo_db/active_version")).thenReturn("0");
+
when(repository.get("/metadata/foo_db/foo_db/versions/0/rules")).thenReturn(readYAML());
+ SchemaRulePersistService schemaRulePersistService = new
SchemaRulePersistService(repository);
+ assertThat(schemaRulePersistService.isExisted("foo_db"), is(true));
+ assertThat(schemaRulePersistService.isExisted("foo_db_1"), is(false));
Review comment:
Would it be more reasonable to use `assertTrue` and `assertFalse`.
--
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]