vldpyatkov commented on a change in pull request #441:
URL: https://github.com/apache/ignite-3/pull/441#discussion_r752396724
##########
File path:
modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItTablesApiTest.java
##########
@@ -116,97 +125,314 @@
/** Cluster nodes. */
private List<Ignite> clusterNodes;
-
+
/**
* Before each.
*/
@BeforeEach
void beforeEach(TestInfo testInfo) throws Exception {
String metastorageNodeName = IgniteTestUtils.testNodeName(testInfo, 0);
-
+
clusterNodes = IntStream.range(0,
nodesBootstrapCfg.size()).mapToObj(value -> {
String nodeName = IgniteTestUtils.testNodeName(testInfo,
value);
-
+
return IgnitionManager.start(
nodeName,
nodesBootstrapCfg.get(value).apply(metastorageNodeName),
workDir.resolve(nodeName));
}
).collect(Collectors.toList());
}
-
+
/**
* After each.
*/
@AfterEach
void afterEach() throws Exception {
IgniteUtils.closeAll(ItUtils.reverse(clusterNodes));
}
+
+ /**
+ * Trys to create a table which is already created.
+ *
+ * @throws Exception If failed.
+ */
+ @Test
+ public void testTableAlreadyCreated() throws Exception {
+ clusterNodes.forEach(ign ->
assertNull(ign.tables().table(TABLE_NAME)));
+
+ Ignite ignite0 = clusterNodes.get(0);
+
+ Table tbl = createTable(ignite0, SCHEMA, SHORT_TABLE_NAME);
+
+ assertThrows(TableAlreadyExistsException.class,
Review comment:
I already wrote such tests.
I want to see even one which will passed well.
--
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]