How does test a lot of database dialects

12 views
Skip to first unread message

Тимур Шайдуллин

unread,
Nov 24, 2017, 1:33:32 PM11/24/17
to jOOQ User Group
Hello,
Lucas

I suppose you have been encountered a problem testing a multiple database dialects and versions. Could you help me to find a way to do it?

Thank you!

Lukas Eder

unread,
Nov 24, 2017, 2:36:06 PM11/24/17
to jooq...@googlegroups.com
Hi Timur,

Thank you very much for your message.

We run thousands of integration test queries against our 21 different supported databases. These tests are run in an automated manner for most databases (namely those that can be virtualized in VMWare or docker), or manually for the others. The idea is that a jOOQ query like the following...

assertEquals(1, (int) ctx.selectOne().fetchOneInto(int.class));

Should always yield the exact same result on all databases.

There are also unit tests for things like the DefaultRecordMapper, which do not depend directly on the underlying database, but since you're currently looking into contributing support for the GRANT and REVOKE statements [1], I'm assuming that unit tests will be less interesting to you than integration tests.

A good integration test would be setting up 2 database users and an object (e.g. a table) where the owner of the object can then grant access to the other user. There will need to be 2 JDBC connections, one for each user, to validate that user 2 can access the object only after the relevant GRANT has been issued, and that user 2 can no longer access the object once the GRANT has been REVOKED.

As our integration tests are not open source, we would not expect your tests to be very complete. Ideally, a contribution as complex as support for the GRANT statement would simply work on 1-2 databases by your manual testing, and we would take it from there.

I hope this helps. If you have any additional questions, please let me know and I'll be very happy to assist you.
Thanks,
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Timur Shaidullin

unread,
Nov 24, 2017, 3:10:16 PM11/24/17
to jOOQ User Group
Thank you very much. Your answer is suitable to me.

пятница, 24 ноября 2017 г., 21:33:32 UTC+3 пользователь Timur Shaidullin написал:
Reply all
Reply to author
Forward
0 new messages