|
23 | 23 | import org.apache.shardingsphere.infra.metadata.database.rule.RuleMetaData;
|
24 | 24 | import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
|
25 | 25 | import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable;
|
26 |
| -import org.apache.shardingsphere.mode.manager.cluster.persist.coordinator.database.ClusterDatabaseListenerPersistCoordinator; |
27 | 26 | import org.apache.shardingsphere.mode.manager.cluster.persist.coordinator.database.ClusterDatabaseListenerCoordinatorType;
|
| 27 | +import org.apache.shardingsphere.mode.manager.cluster.persist.coordinator.database.ClusterDatabaseListenerPersistCoordinator; |
28 | 28 | import org.apache.shardingsphere.mode.metadata.manager.MetaDataContextManager;
|
29 | 29 | import org.apache.shardingsphere.mode.metadata.persist.MetaDataPersistFacade;
|
30 | 30 | import org.apache.shardingsphere.mode.spi.repository.PersistRepository;
|
|
40 | 40 | import org.mockito.internal.configuration.plugins.Plugins;
|
41 | 41 | import org.mockito.junit.jupiter.MockitoExtension;
|
42 | 42 |
|
43 |
| -import java.sql.SQLException; |
44 | 43 | import java.util.Collections;
|
45 | 44 | import java.util.Properties;
|
46 | 45 |
|
@@ -142,29 +141,29 @@ void assertAlterSingleRuleConfiguration() {
|
142 | 141 | }
|
143 | 142 |
|
144 | 143 | @Test
|
145 |
| - void assertAlterNullRuleConfiguration() throws SQLException { |
| 144 | + void assertAlterNullRuleConfiguration() { |
146 | 145 | metaDataManagerPersistService.alterRuleConfiguration(new ShardingSphereDatabase("foo_db", mock(), mock(), mock(), Collections.emptyList()), null);
|
147 | 146 | verify(metaDataPersistFacade.getDatabaseRuleService(), times(0)).persist(eq("foo_db"), any());
|
148 | 147 | }
|
149 | 148 |
|
150 | 149 | @Test
|
151 | 150 | @Disabled
|
152 |
| - void assertAlterRuleConfiguration() throws SQLException { |
| 151 | + void assertAlterRuleConfiguration() { |
153 | 152 | RuleConfiguration ruleConfig = new SingleRuleConfiguration();
|
154 | 153 | when(metaDataContextManager.getMetaDataContexts().getMetaData().getDatabase("foo_db").getProtocolType()).thenReturn(new MockedDatabaseType());
|
155 | 154 | metaDataManagerPersistService.alterRuleConfiguration(new ShardingSphereDatabase("foo_db", new MockedDatabaseType(), mock(), mock(), Collections.emptyList()), ruleConfig);
|
156 | 155 | verify(metaDataPersistFacade.getDatabaseRuleService()).persist("foo_db", Collections.singleton(ruleConfig));
|
157 | 156 | }
|
158 | 157 |
|
159 | 158 | @Test
|
160 |
| - void assertRemoveNullRuleConfigurationItem() throws SQLException { |
| 159 | + void assertRemoveNullRuleConfigurationItem() { |
161 | 160 | metaDataManagerPersistService.removeRuleConfigurationItem(new ShardingSphereDatabase("foo_db", mock(), mock(), mock(), Collections.emptyList()), null);
|
162 | 161 | verify(metaDataPersistFacade.getDatabaseRuleService(), times(0)).delete(eq("foo_db"), anyCollection());
|
163 | 162 | }
|
164 | 163 |
|
165 | 164 | @Test
|
166 | 165 | @Disabled
|
167 |
| - void assertRemoveRuleConfigurationItem() throws SQLException { |
| 166 | + void assertRemoveRuleConfigurationItem() { |
168 | 167 | RuleConfiguration ruleConfig = new SingleRuleConfiguration();
|
169 | 168 | metaDataManagerPersistService.removeRuleConfigurationItem(new ShardingSphereDatabase("foo_db", mock(), mock(), mock(), Collections.emptyList()), ruleConfig);
|
170 | 169 | verify(metaDataPersistFacade.getDatabaseRuleService()).delete("foo_db", Collections.singleton(ruleConfig));
|
|
0 commit comments