This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang 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 33aaf717167 Update powered by (#21144)
33aaf717167 is described below
commit 33aaf7171675cb64d1e54317785449458f6b8f2e
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Sep 23 10:41:48 2022 +0800
Update powered by (#21144)
---
docs/community/content/powered-by/_index.cn.md | 3 ++-
docs/community/content/powered-by/_index.en.md | 3 ++-
.../MigrationChangedJobConfigurationProcessor.java | 5 ++--
.../resource/DropResourceBackendHandlerTest.java | 27 +++++++---------------
4 files changed, 14 insertions(+), 24 deletions(-)
diff --git a/docs/community/content/powered-by/_index.cn.md
b/docs/community/content/powered-by/_index.cn.md
index 23064cbdcc9..f36b6d8cb67 100644
--- a/docs/community/content/powered-by/_index.cn.md
+++ b/docs/community/content/powered-by/_index.cn.md
@@ -13,7 +13,7 @@ chapter = true
## 谁在使用 ShardingSphere?
-共计 220 家公司。
+共计 221 家公司。
### 基础软件
<ul>
@@ -162,6 +162,7 @@ chapter = true
<li><a href="https://www.keking.com" rel="nofollow">凯京科技</a></li>
<li><a href="http://www.c-wms.net/" rel="nofollow">弘人网络科技</a></li>
<li><a href="http://www.xbnwl.com/" rel="nofollow">喜百年供应链科技</a></li>
+ <li><a href="https://www.nti56.com/" rel="nofollow">今天国际</a></li>
</ul>
### 旅游服务
diff --git a/docs/community/content/powered-by/_index.en.md
b/docs/community/content/powered-by/_index.en.md
index 00e737fadeb..df2f3e6f781 100644
--- a/docs/community/content/powered-by/_index.en.md
+++ b/docs/community/content/powered-by/_index.en.md
@@ -13,7 +13,7 @@ Please register
[here](https://github.com/apache/shardingsphere/discussions/1225
## Who is Using ShardingSphere?
-Total: 220 companies.
+Total: 221 companies.
### Infra Software
<ul>
@@ -162,6 +162,7 @@ Total: 220 companies.
<li><a href="http://www.c-wms.net/" rel="nofollow">C-WMS</a></li>
<li><a href="http://www.xbnwl.com/" rel="nofollow">Xbnwl</a></li>
<li><a href="https://www.huimin.cn" rel="nofollow">HuiMin</a></li>
+ <li><a href="https://www.nti56.com/" rel="nofollow">LOGIS-TECH</a></li>
</ul>
### Travel
diff --git
a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/MigrationChangedJobConfigurationProcessor.java
b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/MigrationChangedJobConfigurationProcessor.java
index d1922948cf6..1333121ec89 100644
---
a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/MigrationChangedJobConfigurationProcessor.java
+++
b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/MigrationChangedJobConfigurationProcessor.java
@@ -52,9 +52,8 @@ public final class MigrationChangedJobConfigurationProcessor
implements Pipeline
log.info("{} added to executing jobs failed since it
already exists", jobId);
} else {
log.info("{} executing jobs", jobId);
- CompletableFuture.runAsync(() -> execute(jobConfigPOJO),
PipelineContext.getEventListenerExecutor()).whenComplete((unused, throwable) ->
{
- log.error("execute failed, jobId={}", jobId,
throwable);
- });
+ CompletableFuture.runAsync(() -> execute(jobConfigPOJO),
PipelineContext.getEventListenerExecutor())
+ .whenComplete((unused, throwable) ->
log.error("execute failed, jobId={}", jobId, throwable));
}
break;
case DELETED:
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/resource/DropResourceBackendHandlerTest.java
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/resource/DropResourceBackendHandlerTest.java
index 67efa94b26c..07f9b24cc42 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/resource/DropResourceBackendHandlerTest.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/resource/DropResourceBackendHandlerTest.java
@@ -20,6 +20,8 @@ package
org.apache.shardingsphere.proxy.backend.handler.distsql.rdl.resource;
import
org.apache.shardingsphere.distsql.parser.statement.rdl.drop.DropResourceStatement;
import org.apache.shardingsphere.infra.datanode.DataNode;
import org.apache.shardingsphere.infra.distsql.exception.DistSQLException;
+import
org.apache.shardingsphere.infra.distsql.exception.resource.MissingRequiredResourcesException;
+import
org.apache.shardingsphere.infra.distsql.exception.resource.ResourceInUsedException;
import
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import
org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResource;
import
org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
@@ -42,7 +44,6 @@ import java.sql.SQLException;
import java.util.Collections;
import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
import static org.mockito.Mockito.mock;
@@ -106,16 +107,12 @@ public final class DropResourceBackendHandlerTest extends
ProxyContextRestorer {
verify(contextManager).dropResources("test",
dropResourceStatement.getNames());
}
- @Test
+ @Test(expected = MissingRequiredResourcesException.class)
public void assertResourceNameNotExistedExecute() {
- try {
- dropResourceBackendHandler.execute("test", new
DropResourceStatement(Collections.singleton("foo_ds"), false));
- } catch (final DistSQLException ex) {
- assertThat(ex.toSQLException().getMessage(), is("Resources
`[foo_ds]` do not exist in database `test`"));
- }
+ dropResourceBackendHandler.execute("test", new
DropResourceStatement(Collections.singleton("foo_ds"), false));
}
- @Test
+ @Test(expected = ResourceInUsedException.class)
public void assertResourceNameInUseExecute() {
when(ruleMetaData.getRules()).thenReturn(Collections.singleton(shadowRule));
when(shadowRule.getType()).thenReturn("ShadowRule");
@@ -123,14 +120,10 @@ public final class DropResourceBackendHandlerTest extends
ProxyContextRestorer {
when(resource.getDataSources()).thenReturn(Collections.singletonMap("foo_ds",
dataSource));
when(database.getResource()).thenReturn(resource);
when(contextManager.getMetaDataContexts().getMetaData().getDatabase("test")).thenReturn(database);
- try {
- dropResourceBackendHandler.execute("test", new
DropResourceStatement(Collections.singleton("foo_ds"), false));
- } catch (final DistSQLException ex) {
- assertThat(ex.toSQLException().getMessage(), is("Resource `foo_ds`
is still used by `[ShadowRule]`"));
- }
+ dropResourceBackendHandler.execute("test", new
DropResourceStatement(Collections.singleton("foo_ds"), false));
}
- @Test
+ @Test(expected = ResourceInUsedException.class)
public void assertResourceNameInUseWithoutIgnoreSingleTables() {
when(ruleMetaData.getRules()).thenReturn(Collections.singleton(singleTableRule));
when(singleTableRule.getType()).thenReturn("SingleTableRule");
@@ -140,11 +133,7 @@ public final class DropResourceBackendHandlerTest extends
ProxyContextRestorer {
when(resource.getDataSources()).thenReturn(Collections.singletonMap("foo_ds",
dataSource));
when(database.getResource()).thenReturn(resource);
when(contextManager.getMetaDataContexts().getMetaData().getDatabase("test")).thenReturn(database);
- try {
- dropResourceBackendHandler.execute("test", new
DropResourceStatement(Collections.singleton("foo_ds"), false));
- } catch (final DistSQLException ex) {
- assertThat(ex.toSQLException().getMessage(), is("Resource `foo_ds`
is still used by `[SingleTableRule]`"));
- }
+ dropResourceBackendHandler.execute("test", new
DropResourceStatement(Collections.singleton("foo_ds"), false));
}
@Test