> Are you using a memory database or a file-backed database? memory.
> If a memory database, the error appears to be it creates a new connection... Ok, you're saying that a new connection is created for every thread, and that means, an empty memory database? Even when I ran the migrations in the main thread's connection? That seems a bit odd. What'd be the best way to workaround that? I've tried changing to a file-backed database, but now I'm seeing lock contention issues on the file (see: https://gitlab.com/honeyryderchuck/rodauth-oauth/-/jobs/710170917). > Not sure if this is an issue with sequel-active_record_adapte... Do you mean sequel-activecord_connection, or jdbc-sqlite3, or activerecord-jdbc-adapter? I could try to narrow this down to a small purpose script to see if I can pinpoint the dependency. I was hoping you had seen this before and could suggest a workaround, as that might take me some time. A sábado, 29 de agosto de 2020 à(s) 17:18:39 UTC+1, Jeremy Evans escreveu: > On Saturday, August 29, 2020 at 7:27:28 AM UTC-7, Tiago Cardoso wrote: >> >> >> Hi, >> >> I'm currently trying to enable parallel tests in "rodauth-oauth" across >> all tested databases, and I'm having issues particularly with running the >> tests on jruby against a sqlite database. >> >> An example of the problem I'm finding can be seen here: >> https://gitlab.com/honeyryderchuck/rodauth-oauth/-/jobs/709664165 (debug >> log was enabled to better have a look at what is going on). >> >> Of note, I can share the interesting parts of the configuration: >> >> --------------- >> >> >> https://gitlab.com/honeyryderchuck/rodauth-oauth/-/blob/master/test/support/roda_integration.rb#L38-41 >> >> I initialize the db in the beginning of the config, and run the >> migrations immediately. >> >> --------------- >> >> >> https://gitlab.com/honeyryderchuck/rodauth-oauth/-/blob/issue-26/test/support/roda_integration.rb#L141-147 >> >> This is where a wrap the test around an auto-rollbackable transaction, >> the same way "database-cleaner" or "rodauth" itself sets it up in its >> tests. This is also where the bug happens, when I insert the account. Of >> importance, the error only happens when running the tests in parallel-mode >> (when PARALLEL=1). >> >> >> I know this is not a small purpose script reproducing the issue, but I'm >> banking on someone having seen and reported that before, and maybe giving >> me hints on how to work around this. This can also be an issue with the >> "jdbc-sqlite-adapter" gem, or with sqlite itself. >> >> If someone has some hint on this, or can give me tips on how to best >> debug this, that'd be very helpful. >> > > Are you using a memory database or a file-backed database? If a memory > database, the error appears to be it creates a new connection, which uses a > new (empty) memory database. Not sure if this is an issue with > sequel-active_record_adapter or something else. Sequel defaults to only > allowing a single connection if it thinks you are using a memory database. > > Thanks, > Jeremy > -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/c2d89f51-518c-456c-b443-86049cf4d71an%40googlegroups.com.
