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("[email protected]");
+
+ 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("[email protected]");
+
+ Account account2 = new Account();
+ account2.setId(666);
+ account2.setFirstName("Amos");
+ account2.setLastName("Feng");
+ account2.setEmailAddress("[email protected]");
+
+ 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]