Error In Mock DB For Unit Test - Bulk Insert

11 views
Skip to first unread message

Debapriya Patra

unread,
Sep 3, 2019, 5:51:02 PM9/3/19
to jOOQ User Group

Hi,

While writing unit test for my DAO methods, i am getting an error Not yet supported.

14:46:50.838 [Test worker] DEBUG org.jooq.tools.LoggerListener - Executing batch query    : insert into "public"."recent_activity" ("updated", "deck_id", "user_id") values (cast(? as timestamp), cast(? as uuid), cast(? as uuid))
14:46:50.842 [Test worker] DEBUG org.jooq.tools.LoggerListener - Exception                
org.jooq.exception.DataAccessException: SQL [insert into "public"."recent_activity" ("updated", "deck_id", "user_id") values (cast(? as timestamp), cast(? as uuid), cast(? as uuid))]; Not yet supported


I am currently on jOOQ3.11 . Do i need to upgrade the version or its not yet supported ?

Thanks,
Deba

Lukas Eder

unread,
Sep 4, 2019, 3:26:29 AM9/4/19
to jOOQ User Group
Hi Deba,

Thank you very much for your message. Indeed, JDBC's batch statements (and by consequence jOOQ's batch statements) are not yet supported by the MockFileDatabase. They are supported by the MockConnection, though, so as a workaround, you could enhance your MockConnection to use a MockFileDatabase only when statements are not batched.

We didn't have a feature request for this yet, so the feature has not been on our roadmap in the past. I've created a feature request for this:

Thanks again,
Lukas 

--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/be51f612-d337-4195-aa3b-c6cfc4482355%40googlegroups.com.

Debapriya Patra

unread,
Sep 4, 2019, 4:30:22 PM9/4/19
to jOOQ User Group
Hi Lukas,

Thank You So Much !
To unsubscribe from this group and stop receiving emails from it, send an email to jooq...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages