Closed HeinrichApfelmus closed 2 months ago
What about adding now tests like: (a) open-close-open-close... OK (b) open-open -> error (c) close-close -> error just to be sure this basic db operations work as expected? Make sense to do it now?
Since only with…
-style functions are exported, only case (a) is available for testing. If anything, I would add concurrency to the tests. However, I would like to postpone testing these functions for now.
This pull request changes
Cardano.Wallet.Deposit.IO.DB
to usesqlite-simple
instead ofpersistent
.The reason for this change is that
withDBHandleInMemory
throws an exception when called twice in some circumstances.It appears that this bug is located in a dependency. Rumor has it that there might be a bug in
persistent
where SQL statements are not finalized. It seems likely that the SQL statement which is not finalized is theBEGIN TRANSACTION
statement thatpersistent
reuses in each call torunSqlConn
. I did not investigate this further, as I want to move away frompersistent
anyway, and usingsqlite-simple
fixes the issue.Comment
This pull request prepares the implementation of a mock environment for the Deposit Wallet. In turn, this enables execution of user scenarios.
Issue Number
ADP-3335