aldettinger commented on code in PR #4769: URL: https://github.com/apache/camel-quarkus/pull/4769#discussion_r1165178632
########## integration-tests/mybatis/src/test/java/org/apache/camel/quarkus/component/mybatis/it/MyBatisTest.java: ########## @@ -70,17 +98,126 @@ public void testInsert() { .body(equalTo("3")); } + public void testInsertRollback() { + Account account = new Account(); + account.setId(999); + account.setFirstName("Rollback"); + account.setLastName("Rollback"); + account.setEmailAddress("rollb...@gmail.com"); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(account) + .post("/mybatis/insertOne") + .then() + .statusCode(500); + } + + public void testInsertList() { + Account account1 = new Account(); + account1.setId(555); + account1.setFirstName("Aaron"); + account1.setLastName("Daubman"); + account1.setEmailAddress("readthedevl...@gmail.com"); + + Account account2 = new Account(); + account2.setId(666); + account2.setFirstName("Amos"); + account2.setLastName("Feng"); + account2.setEmailAddress("zh...@gmail.com"); + + List<Account> accountList = new ArrayList<>(2); + + accountList.add(account1); + accountList.add(account2); + + RestAssured.given() + .contentType(ContentType.JSON) + .body(accountList) + .post("/mybatis/insertList") + .then() + .statusCode(200) + .body(equalTo("5")); Review Comment: Why it does return 5 here ? We batch insert only 2 items ? Maybe there 3 before that ? -- 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: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org