Skip to content

Commit 8ce1b6c

Browse files
committed
Add GraalVM Reachability Metadata and corresponding nativeTest for Firebird
1 parent ad4a8b1 commit 8ce1b6c

File tree

16 files changed

+578
-12
lines changed

16 files changed

+578
-12
lines changed

RELEASE-NOTES.md

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
1. Mode: Support modifying Hikari-CP configurations via props in standalone mode [#34185](https://github.com/apache/shardingsphere/pull/34185)
5757
1. Encrypt: Support insert statement rewrite use quote [#34259](https://github.com/apache/shardingsphere/pull/34259)
5858
1. Infra: Support connecting to Firebird via jdbcUrl containing the absolute path to fdb - [#34335](https://github.com/apache/shardingsphere/pull/34335)
59+
1. Proxy Native: Add GraalVM Reachability Metadata and corresponding nativeTest for Firebird - [#34307](https://github.com/apache/shardingsphere/pull/34307)
5960

6061
### Bug Fixes
6162

infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json

+41-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"name":"[Lcom.github.dockerjava.api.model.VolumesFrom;"
2525
},
2626
{
27-
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager$$Lambda/0x00007f8e2be1b4b0"},
27+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager$$Lambda/0x00007f2633df9040"},
2828
"name":"[Lcom.zaxxer.hikari.util.ConcurrentBag$IConcurrentBagEntry;"
2929
},
3030
{
@@ -745,11 +745,6 @@
745745
"queryAllPublicConstructors":true,
746746
"methods":[{"name":"<init>","parameterTypes":[] }, {"name":"add","parameterTypes":["long"] }, {"name":"sum","parameterTypes":[] }]
747747
},
748-
{
749-
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask"},
750-
"name":"java.util.concurrent.atomic.Striped64$Cell",
751-
"fields":[{"name":"value"}]
752-
},
753748
{
754749
"condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"},
755750
"name":"java.util.function.DoubleFunction",
@@ -3256,11 +3251,31 @@
32563251
"condition":{"typeReachable":"org.apache.shardingsphere.sql.parser.core.database.cache.ParseTreeCacheBuilder"},
32573252
"name":"org.apache.shardingsphere.sql.parser.core.database.cache.ParseTreeCacheLoader"
32583253
},
3254+
{
3255+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement"},
3256+
"name":"org.apache.shardingsphere.sql.parser.firebird.parser.FirebirdLexer",
3257+
"methods":[{"name":"<init>","parameterTypes":["org.antlr.v4.runtime.CharStream"] }]
3258+
},
3259+
{
3260+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement"},
3261+
"name":"org.apache.shardingsphere.sql.parser.firebird.parser.FirebirdParser",
3262+
"methods":[{"name":"<init>","parameterTypes":["org.antlr.v4.runtime.TokenStream"] }]
3263+
},
32593264
{
32603265
"condition":{"typeReachable":"org.apache.shardingsphere.sql.parser.core.database.visitor.SQLStatementVisitorFactory"},
32613266
"name":"org.apache.shardingsphere.sql.parser.firebird.visitor.statement.FirebirdStatementVisitorFacade",
32623267
"methods":[{"name":"<init>","parameterTypes":[] }]
32633268
},
3269+
{
3270+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement"},
3271+
"name":"org.apache.shardingsphere.sql.parser.firebird.visitor.statement.type.FirebirdDDLStatementVisitor",
3272+
"methods":[{"name":"<init>","parameterTypes":[] }]
3273+
},
3274+
{
3275+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement"},
3276+
"name":"org.apache.shardingsphere.sql.parser.firebird.visitor.statement.type.FirebirdDMLStatementVisitor",
3277+
"methods":[{"name":"<init>","parameterTypes":[] }]
3278+
},
32643279
{
32653280
"condition":{"typeReachable":"org.apache.shardingsphere.sql.parser.core.database.visitor.SQLStatementVisitorFactory"},
32663281
"name":"org.apache.shardingsphere.sql.parser.hive.visitor.statement.HiveStatementVisitorFacade",
@@ -3421,6 +3436,26 @@
34213436
"name":"org.apache.shardingsphere.sql.parser.statement.clickhouse.dml.ClickHouseSelectStatement",
34223437
"methods":[{"name":"<init>","parameterTypes":[] }]
34233438
},
3439+
{
3440+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement"},
3441+
"name":"org.apache.shardingsphere.sql.parser.statement.firebird.ddl.FirebirdCreateTableStatement",
3442+
"methods":[{"name":"<init>","parameterTypes":[] }]
3443+
},
3444+
{
3445+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement"},
3446+
"name":"org.apache.shardingsphere.sql.parser.statement.firebird.dml.FirebirdInsertStatement",
3447+
"methods":[{"name":"<init>","parameterTypes":[] }]
3448+
},
3449+
{
3450+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement"},
3451+
"name":"org.apache.shardingsphere.sql.parser.statement.firebird.dml.FirebirdSelectStatement",
3452+
"methods":[{"name":"<init>","parameterTypes":[] }]
3453+
},
3454+
{
3455+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement"},
3456+
"name":"org.apache.shardingsphere.sql.parser.statement.firebird.dml.FirebirdSelectStatement",
3457+
"methods":[{"name":"<init>","parameterTypes":[] }]
3458+
},
34243459
{
34253460
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement"},
34263461
"name":"org.apache.shardingsphere.sql.parser.statement.hive.dml.HiveInsertStatement",

infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json

+8-5
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager"},
9292
"pattern":"\\QMETA-INF/services/com.clickhouse.client.ClickHouseClient\\E"
9393
}, {
94-
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager$$Lambda/0x00007f8e2bcc2910"},
94+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager$$Lambda/0x00007f2633ca3d10"},
9595
"pattern":"\\QMETA-INF/services/com.clickhouse.client.ClickHouseClient\\E"
9696
}, {
9797
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"},
@@ -336,6 +336,9 @@
336336
}, {
337337
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
338338
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.mode.metadata.refresher.MetaDataRefresher\\E"
339+
}, {
340+
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
341+
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.mode.node.spi.RuleNodePathProvider\\E"
339342
}, {
340343
"condition":{"typeReachable":"org.apache.shardingsphere.mode.persist.coordinator.PersistCoordinatorFacade"},
341344
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.mode.persist.coordinator.PersistCoordinatorFacadeBuilder\\E"
@@ -350,10 +353,7 @@
350353
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.mode.repository.standalone.StandalonePersistRepository\\E"
351354
}, {
352355
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
353-
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.mode.spi.RuleItemConfigurationChangedProcessor\\E"
354-
}, {
355-
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
356-
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.mode.spi.RuleNodePathProvider\\E"
356+
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.mode.spi.rule.RuleItemConfigurationChangedProcessor\\E"
357357
}, {
358358
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
359359
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.proxy.backend.connector.AdvancedProxySQLExecutor\\E"
@@ -2031,6 +2031,9 @@
20312031
}, {
20322032
"condition":{"typeReachable":"org.apache.shardingsphere.infra.url.classpath.ClassPathURLLoader"},
20332033
"pattern":"\\Qtest-native/yaml/jdbc/databases/clickhouse.yaml\\E"
2034+
}, {
2035+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.url.classpath.ClassPathURLLoader"},
2036+
"pattern":"\\Qtest-native/yaml/jdbc/databases/firebird.yaml\\E"
20342037
}, {
20352038
"condition":{"typeReachable":"org.apache.shardingsphere.infra.url.classpath.ClassPathURLLoader"},
20362039
"pattern":"\\Qtest-native/yaml/jdbc/databases/hive/acid.yaml\\E"

infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json

+10
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,16 @@
357357
"name":"org.apache.shardingsphere.sql.parser.statement.sqlserver.ddl.SQLServerDropTableStatement",
358358
"methods":[{"name":"<init>","parameterTypes":[] }]
359359
},
360+
{
361+
"condition":{"typeReachable":"org.apache.shardingsphere.sql.parser.statement.firebird.dml.FirebirdDeleteStatement"},
362+
"name":"org.apache.shardingsphere.sql.parser.statement.firebird.dml.FirebirdDeleteStatement",
363+
"methods":[{"name":"<init>","parameterTypes":[] }]
364+
},
365+
{
366+
"condition":{"typeReachable":"org.apache.shardingsphere.sql.parser.statement.firebird.ddl.FirebirdDropTableStatement"},
367+
"name":"org.apache.shardingsphere.sql.parser.statement.firebird.ddl.FirebirdDropTableStatement",
368+
"methods":[{"name":"<init>","parameterTypes":[] }]
369+
},
360370
{
361371
"condition":{"typeReachable":"javax.security.auth.login.Configuration"},
362372
"name":"sun.security.provider.ConfigFile",

infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/resource-config.json

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"pattern":"\\QMETA-INF/services/javax.xml.parsers.SAXParserFactory\\E"
1515
}]},
1616
"bundles":[{
17+
"name":"com.sun.org.apache.xml.internal.serializer.XMLEntities",
18+
"locales":["en"]
19+
}, {
1720
"name":"com.microsoft.sqlserver.jdbc.SQLServerResource",
1821
"locales":["en"]
1922
}, {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
[
2+
{
3+
"condition":{"typeReachable":"org.firebirdsql.encodings.EncodingFactory"},
4+
"name":"org.firebirdsql.encodings.DefaultEncodingSet"
5+
},
6+
{
7+
"condition":{"typeReachable":"org.firebirdsql.gds.impl.GDSFactory"},
8+
"name":"org.firebirdsql.gds.impl.jni.EmbeddedGDSFactoryPlugin"
9+
},
10+
{
11+
"condition":{"typeReachable":"org.firebirdsql.gds.impl.GDSFactory"},
12+
"name":"org.firebirdsql.gds.impl.jni.NativeGDSFactoryPlugin"
13+
},
14+
{
15+
"condition":{"typeReachable":"org.firebirdsql.gds.impl.GDSFactory"},
16+
"name":"org.firebirdsql.gds.impl.oo.OOGDSFactoryPlugin"
17+
},
18+
{
19+
"condition":{"typeReachable":"org.firebirdsql.gds.impl.GDSFactory"},
20+
"name":"org.firebirdsql.gds.impl.wire.WireGDSFactoryPlugin"
21+
},
22+
{
23+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.auth.ClientAuthBlock"},
24+
"name":"org.firebirdsql.gds.ng.wire.auth.legacy.LegacyAuthenticationPluginSpi"
25+
},
26+
{
27+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.auth.ClientAuthBlock"},
28+
"name":"org.firebirdsql.gds.ng.wire.auth.srp.Srp224AuthenticationPluginSpi"
29+
},
30+
{
31+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.auth.ClientAuthBlock"},
32+
"name":"org.firebirdsql.gds.ng.wire.auth.srp.Srp256AuthenticationPluginSpi"
33+
},
34+
{
35+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.auth.ClientAuthBlock"},
36+
"name":"org.firebirdsql.gds.ng.wire.auth.srp.Srp384AuthenticationPluginSpi"
37+
},
38+
{
39+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.auth.ClientAuthBlock"},
40+
"name":"org.firebirdsql.gds.ng.wire.auth.srp.Srp512AuthenticationPluginSpi"
41+
},
42+
{
43+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.auth.ClientAuthBlock"},
44+
"name":"org.firebirdsql.gds.ng.wire.auth.srp.SrpAuthenticationPluginSpi"
45+
},
46+
{
47+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.version13.V13WireOperations"},
48+
"name":"org.firebirdsql.gds.ng.wire.crypt.arc4.Arc4EncryptionPluginSpi",
49+
"methods":[{"name":"<init>","parameterTypes":[] }]
50+
},
51+
{
52+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.version13.V13WireOperations"},
53+
"name":"org.firebirdsql.gds.ng.wire.crypt.chacha.ChaChaEncryptionPluginSpi"
54+
},
55+
{
56+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.ProtocolCollection"},
57+
"name":"org.firebirdsql.gds.ng.wire.version10.Version10Descriptor"
58+
},
59+
{
60+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.ProtocolCollection"},
61+
"name":"org.firebirdsql.gds.ng.wire.version11.Version11Descriptor"
62+
},
63+
{
64+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.ProtocolCollection"},
65+
"name":"org.firebirdsql.gds.ng.wire.version12.Version12Descriptor"
66+
},
67+
{
68+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.ProtocolCollection"},
69+
"name":"org.firebirdsql.gds.ng.wire.version13.Version13Descriptor"
70+
},
71+
{
72+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.ProtocolCollection"},
73+
"name":"org.firebirdsql.gds.ng.wire.version15.Version15Descriptor"
74+
},
75+
{
76+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.ProtocolCollection"},
77+
"name":"org.firebirdsql.gds.ng.wire.version16.Version16Descriptor"
78+
},
79+
{
80+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.ProtocolCollection"},
81+
"name":"org.firebirdsql.gds.ng.wire.version18.Version18Descriptor"
82+
},
83+
{
84+
"condition":{"typeReachable":"org.firebirdsql.jaybird.props.internal.UnregisteredDpbDefiner"},
85+
"name":"org.firebirdsql.jaybird.fb.constants.DpbItems",
86+
"allPublicFields":true
87+
},
88+
{
89+
"condition":{"typeReachable":"org.firebirdsql.jaybird.props.internal.UnregisteredDpbDefiner"},
90+
"name":"org.firebirdsql.jaybird.fb.constants.SpbItems",
91+
"allPublicFields":true
92+
},
93+
{
94+
"condition":{"typeReachable":"org.firebirdsql.jaybird.xca.FBManagedConnection"},
95+
"name":"org.firebirdsql.jaybird.xca.FBManagedConnection",
96+
"fields":[{"name":"connectionHandle"}, {"name":"unnotifiedWarnings"}]
97+
},
98+
{
99+
"condition":{"typeReachable":"org.firebirdsql.jaybird.xca.FBManagedConnectionFactory"},
100+
"name":"org.firebirdsql.jdbc.FBConnection",
101+
"methods":[{"name":"<init>","parameterTypes":["org.firebirdsql.jaybird.xca.FBManagedConnection"] }]
102+
},
103+
{
104+
"condition":{"typeReachable":"org.firebirdsql.jdbc.FBConnection"},
105+
"name":"org.firebirdsql.jdbc.FBConnection",
106+
"fields":[{"name":"savepointCounter"}]
107+
}
108+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"resources":{
3+
"includes":[{
4+
"condition":{"typeReachable":"org.firebirdsql.encodings.EncodingFactory"},
5+
"pattern":"\\QMETA-INF/services/org.firebirdsql.encodings.EncodingSet\\E"
6+
}, {
7+
"condition":{"typeReachable":"org.firebirdsql.gds.impl.GDSFactory"},
8+
"pattern":"\\QMETA-INF/services/org.firebirdsql.gds.impl.GDSFactoryPlugin\\E"
9+
}, {
10+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.ProtocolCollection"},
11+
"pattern":"\\QMETA-INF/services/org.firebirdsql.gds.ng.wire.ProtocolDescriptor\\E"
12+
}, {
13+
"condition":{"typeReachable":"org.firebirdsql.gds.ng.wire.auth.ClientAuthBlock"},
14+
"pattern":"\\QMETA-INF/services/org.firebirdsql.gds.ng.wire.auth.AuthenticationPluginSpi\\E"
15+
}, {
16+
"condition":{"typeReachable":"org.firebirdsql.jaybird.props.internal.ConnectionPropertyRegistry"},
17+
"pattern":"\\QMETA-INF/services/org.firebirdsql.jaybird.props.spi.ConnectionPropertyDefinerSpi\\E"
18+
}, {
19+
"condition":{"typeReachable":"org.firebirdsql.gds.MessageLoader"},
20+
"pattern":"\\Qisc_error_msg.properties\\E"
21+
}, {
22+
"condition":{"typeReachable":"org.firebirdsql.gds.MessageLoader"},
23+
"pattern":"\\Qisc_error_sqlstates.properties\\E"
24+
}, {
25+
"condition":{"typeReachable":"org.firebirdsql.jaybird.Version"},
26+
"pattern":"\\Qorg/firebirdsql/jaybird/version.properties\\E"
27+
}, {
28+
"condition":{"typeReachable":"org.firebirdsql.jaybird.Version"},
29+
"pattern":"\\Qorg/firebirdsql/jaybird/version_zh.properties\\E"
30+
}, {
31+
"condition":{"typeReachable":"org.firebirdsql.jaybird.Version"},
32+
"pattern":"\\Qorg/firebirdsql/jaybird/version_zh_CN.properties\\E"
33+
}, {
34+
"condition":{"typeReachable":"org.firebirdsql.jaybird.Version"},
35+
"pattern":"\\Qorg/firebirdsql/jaybird/version_zh_Hans.properties\\E"
36+
}, {
37+
"condition":{"typeReachable":"org.firebirdsql.jaybird.Version"},
38+
"pattern":"\\Qorg/firebirdsql/jaybird/version_zh_Hans_CN.properties\\E"
39+
}, {
40+
"condition":{"typeReachable":"org.firebirdsql.gds.MessageLoader"},
41+
"pattern":"\\Qorg/firebirdsql/jaybird_error_msg.properties\\E"
42+
}, {
43+
"condition":{"typeReachable":"org.firebirdsql.gds.MessageLoader"},
44+
"pattern":"\\Qorg/firebirdsql/jaybird_error_sqlstates.properties\\E"
45+
}]},
46+
"bundles":[{
47+
"name":"org.firebirdsql.jaybird.version",
48+
"locales":["zh-CN", "en"]
49+
}]
50+
}

test/native/pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@
202202
</exclusion>
203203
</exclusions>
204204
</dependency>
205+
<dependency>
206+
<groupId>org.firebirdsql.jdbc</groupId>
207+
<artifactId>jaybird</artifactId>
208+
<scope>test</scope>
209+
</dependency>
205210
<dependency>
206211
<groupId>org.testcontainers</groupId>
207212
<artifactId>junit-jupiter</artifactId>

test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/TestShardingService.java

+11
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,15 @@ public void cleanEnvironment() throws SQLException {
200200
orderItemRepository.dropTableInMySQL();
201201
addressRepository.dropTableInMySQL();
202202
}
203+
204+
/**
205+
* Clean environment in Firebird.
206+
*
207+
* @throws SQLException An exception that provides information on a database access error or other errors.
208+
*/
209+
public void cleanEnvironmentInFirebird() throws SQLException {
210+
orderRepository.dropTableInFirebird();
211+
orderItemRepository.dropTableInFirebird();
212+
addressRepository.dropTableInFirebird();
213+
}
203214
}

test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/proxy/ProxyTestingServer.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
import org.apache.curator.test.InstanceSpec;
2222
import org.apache.shardingsphere.proxy.Bootstrap;
2323
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
24+
import org.awaitility.Awaitility;
2425

2526
import java.io.IOException;
2627
import java.sql.SQLException;
2728
import java.util.concurrent.CompletableFuture;
29+
import java.util.concurrent.TimeUnit;
2830

2931
/**
3032
* This class is designed to start ShardingSphere Proxy directly in the current process,
@@ -59,7 +61,8 @@ public ProxyTestingServer(final String configAbsolutePath) {
5961
* Force close ShardingSphere Proxy. See {@link org.apache.shardingsphere.proxy.frontend.ShardingSphereProxy#close}.
6062
*/
6163
public void close() {
62-
ProxyContext.getInstance().getContextManager().close();
6364
completableFuture.cancel(false);
65+
Awaitility.await().atMost(1L, TimeUnit.MINUTES).until(completableFuture::isDone);
66+
ProxyContext.getInstance().getContextManager().close();
6467
}
6568
}

0 commit comments

Comments
 (0)