diff --git a/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/incremental/client/MySQLBinlogClientTest.java b/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/incremental/client/MySQLBinlogClientTest.java index a7d5863c9b005..dc265522f99f3 100644 --- a/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/incremental/client/MySQLBinlogClientTest.java +++ b/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/incremental/client/MySQLBinlogClientTest.java @@ -66,15 +66,11 @@ class MySQLBinlogClientTest { @SuppressWarnings("unchecked") @BeforeEach - void setUp() throws InterruptedException { + void setUp() { client = new MySQLBinlogClient(new ConnectInfo(1, "host", 3306, "username", "password"), false); when(channel.pipeline()).thenReturn(pipeline); when(channel.isOpen()).thenReturn(true); when(channel.close()).thenReturn(channelFuture); - when(channelFuture.sync()).thenAnswer(invocation -> { - when(channel.isOpen()).thenReturn(false); - return null; - }); when(channel.localAddress()).thenReturn(new InetSocketAddress("host", 3306)); when(channel.attr(MySQLConstants.SEQUENCE_ID_ATTRIBUTE_KEY)).thenReturn(mock(Attribute.class)); when(channel.attr(MySQLConstants.SEQUENCE_ID_ATTRIBUTE_KEY).get()).thenReturn(new AtomicInteger()); @@ -152,7 +148,7 @@ private void mockChannelResponseInThread(final Object response) { } @Test - void assertPollFailed() throws ReflectiveOperationException { + void assertPollOnNotRunning() throws ReflectiveOperationException { Plugins.getMemberAccessor().set(MySQLBinlogClient.class.getDeclaredField("channel"), client, channel); Plugins.getMemberAccessor().set(MySQLBinlogClient.class.getDeclaredField("running"), client, false); assertThat(client.poll(), is(Collections.emptyList())); diff --git a/mode/core/src/main/java/org/apache/shardingsphere/mode/persist/service/MetaDataManagerPersistService.java b/mode/core/src/main/java/org/apache/shardingsphere/mode/persist/service/MetaDataManagerPersistService.java index 8364cf5f5a643..4b75c46be15da 100644 --- a/mode/core/src/main/java/org/apache/shardingsphere/mode/persist/service/MetaDataManagerPersistService.java +++ b/mode/core/src/main/java/org/apache/shardingsphere/mode/persist/service/MetaDataManagerPersistService.java @@ -138,8 +138,9 @@ public interface MetaDataManagerPersistService { * * @param databaseName database name * @param ruleName rule name + * @throws SQLException SQL exception */ - void removeRuleConfiguration(String databaseName, String ruleName); + void removeRuleConfiguration(String databaseName, String ruleName) throws SQLException; /** * Alter global rule configuration. diff --git a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/ITContainers.java b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/ITContainers.java index a15820f5089e3..5d26539638d8e 100644 --- a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/ITContainers.java +++ b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/ITContainers.java @@ -21,6 +21,7 @@ import com.github.dockerjava.api.model.ContainerNetwork; import com.google.common.base.Strings; import lombok.Getter; +import lombok.extern.slf4j.Slf4j; import org.apache.shardingsphere.test.e2e.env.container.atomic.governance.GovernanceContainer; import org.slf4j.LoggerFactory; import org.testcontainers.containers.Network; @@ -37,6 +38,7 @@ /** * IT containers. */ +@Slf4j public final class ITContainers implements Startable { private final String scenario; @@ -101,6 +103,7 @@ public void start() { } private void start(final DockerITContainer dockerITContainer) { + log.info("Starting container {}...", dockerITContainer.getName()); dockerITContainer.start(); dockerITContainer.getNetworkAliases().forEach(each -> DnsCacheManipulator.setDnsCache(each, dockerITContainer.getContainerInfo().getNetworkSettings().getNetworks().values().stream().map(ContainerNetwork::getIpAddress).collect(Collectors.toList()).toArray(new String[0])));