Fork me on GitHub
#sql
<
2018-05-15
>
ccann19:05:32

anyone have trouble recently with transactions not rolling back? e.g.

(jdbc/with-db-transaction [tconn *db*]
              (jdbc/db-set-rollback-only! tconn)
             (insert-one tconn {...})

seancorfield19:05:11

@ccann which database are you using? Not all databases/JDBC drivers support transaction rollback

ccann19:05:00

@seancorfield appreciate the response. I’m using postgres. I just figured it out. It turns out that I just misunderstood my test fixture. I was inserting and selecting and expecting an empty response because I was expecting the insertion to roll back, but I was doing both those things in one deftest. while my fixture wraps :each in a rollback transaction

4