Hi,

it looks like  database_cleaner-sequel gem is used to run the test within a 
transaction so that database updates are cleaned up after the test runs.

You'll achieve the same results if you use the testing strategy as 
suggested by Jeremy in Sequel docs -
https://sequel.jeremyevans.net/rdoc/files/doc/testing_rdoc.html

Hope it helps.


On Friday, November 5, 2021 at 11:30:39 AM UTC+5:30 vil...@gmail.com wrote:

> It's fine, thanks for help,  if there have any useful update, i will 
> report here.
> 在2021年11月2日星期二 UTC+8 下午10:39:32<Jeremy Evans> 写道:
>
>> On Tue, Nov 2, 2021 at 12:30 AM Billy Zheng <vil...@gmail.com> wrote:
>>
>>> Hi, after some research, this test failing issue caused by 
>>> database_cleaner-sequel gem.
>>>
>>> config here.  
>>> https://github.com/zw963/marketbet_crawler/blob/4e3537a267d93c3fc109ccebc119d08571d58d43/test/test_helper.rb
>>>
>>> after change DatabaseCleaner[:sequel].strategy from :transaction into 
>>> :truncate, all test case works now.
>>>
>>> I create a new issue there.  
>>> https://github.com/DatabaseCleaner/database_cleaner-sequel/issues/23
>>>
>>> do you think if this is expected behavior? if not, could you please give 
>>> some guiding suggestions for that issue?
>>>
>>
>> I apologize, but I don't have time to look at the database_cleaner-sequel 
>> implementation.  Maybe it uses the current thread in some way when using 
>> the transaction approach, and that doesn't work well when using fibers 
>> instead of threads for concurrency?
>>
>> 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 sequel-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/911ef1c7-74bd-4f1c-b1be-9016b5bafd65n%40googlegroups.com.

Reply via email to