NSAmelchev commented on code in PR #12448:
URL: https://github.com/apache/ignite/pull/12448#discussion_r2452383424
##########
modules/indexing/src/test/java/org/apache/ignite/internal/dump/DumpCacheConfigTest.java:
##########
@@ -47,6 +61,85 @@ public class DumpCacheConfigTest extends
GridCommonAbstractTest {
super.beforeTest();
}
+ /**
+ * Checks that when pass SQL flag to {@link
TcpIgniteClient#createCache(ClientCacheConfiguration, boolean)} table
+ * will be standart SQL table which can be modified and dropped with SQL
DDL.
+ */
+ @Test
+ public void testSQLTableRecreateFromDump() throws Exception {
+ IgniteEx srv = startGrid(1);
+
+ executeSql(srv, "CREATE TABLE T1(ID INT, NAME VARCHAR, PRIMARY KEY
(ID)) WITH \"CACHE_NAME=T1\"");
+
+ for (int i = 0; i < KEYS_CNT; i++)
+ executeSql(srv, "INSERT INTO T1 VALUES(?, ?)", i, "Name-" + i);
+
+ srv.snapshot().createDump(DMP_NAME, null).get(10_000L);
+
+ String cacheName = F.first(srv.cacheNames());
+
+ executeSql(srv, "DROP TABLE T1");
+
+ stopAllGrids();
+ cleanPersistenceDir(true);
+
+ srv = startGrid(1);
+
+ DumpConsumer cnsmr = new DumpConsumer() {
+ /** */
+ IgniteClient thin;
+
+ @Override public void start() {
+ thin = Ignition.startClient(new
ClientConfiguration().setAddresses(SERVER));
Review Comment:
Lets close the client after the test.
--
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]