Fix spurious aborts when retrying transactions by 3noch · Pull Request #34 · haskellari/postgresql-simple (original) (raw)

I think there aren't, but that's not to reason to add them.

I'd be happy with any withTransactionModeRetry tests, during the transaction generatingSqlError is easy, isn't it? I'm not asking you to write that though: If you could sketch how the test for SqlError in COMMIT would work (what kind of queries to run, etc.), I can try to make it into a test. I hope that on actually multi-core machine (which I luckily have) situation will happen multiple times.

About instrumentation: good point, yet I'll be fine if that test doesn't work before this patch, but works afterwards.