Hi Adithya,

Thanks for your message. I just spent quite some time trying to reproduce
the issue and after tweaking a ton of things, I could, indeed. Having said
so, may I ask you to please use our official MCVE template in the future:
https://github.com/jOOQ/jOOQ-mcve

MCVE stands for "Minimal, Complete, Verifiable Example". Yours is "C" and
"V", but not M. I had to remove tons of things, set up databases manually,
tweak configuration, passwords, etc. and set up test data by hand, because
your test didn't do that.

Only to find out that something was simply wrong with your test setup
itself. Adding the following line to the test itself "fixes" the test:

context.settings().withExecuteWithOptimisticLocking(true)


One reason why I keep recommending using our MCVE template is because when
trying to create a *Minimal* example, this kind of mistake is easily
detected as you remove unnecessary things to make it minimal, and then
suddenly, the test works.

I hope this helps,
Lukas


On Sun, Jun 18, 2023 at 12:53 PM adithya kamath <kamath...@gmail.com> wrote:

> Hey,
>
> I've tried to set up a concurrency test for optimistic locking and I'm not
> getting any exceptions at all.
> There are two methods, one I saw in some post in the group and also wiith
> the assert throws and both of them were tried seperately.
>
> Please have a look at this file
> <https://github.com/kamathis4/TaskBoard/blob/repositories/src/test/kotlin/com/adikmt/taskBoard/integrationtest/concurrencytest/CardConcurrencyTest.kt>
>
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jooq-user/7e5c13a6-89af-459a-adf6-8eb0059c2f36n%40googlegroups.com
> <https://groups.google.com/d/msgid/jooq-user/7e5c13a6-89af-459a-adf6-8eb0059c2f36n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAB4ELO7mw5Dz-mmpe-h5PCGJUyKH1dGZCBF4bXopGT%3Dj0q6xoA%40mail.gmail.com.

Reply via email to