3 Star 0 Fork 11

src-openEuler/rubygem-activerecord

 / 详情

rubygem-activerecord build problem in openEuler:22.09

已完成
缺陷 成员
创建于  
2022-09-14 20:53

评论 (2)

small_leek 创建了缺陷

Hi small_leek, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: sig-ruby, and any of the maintainers: @small_leek , @木得感情的openEuler机器人 , @jiangxinyu

openeuler-ci-bot 添加了
 
sig/sig-ruby
标签
small_leek 添加协作者small_leek
small_leek 负责人small_leek 修改为caodongxia

相关测试用例代码如下:

24     def test_db_checks_database_exists
25          ActiveRecord::Base.stub(:establish_connection, nil) do
26            assert_called_with(File, :exist?, [@database], returns: false) do
27              ActiveRecord::Tasks::DatabaseTasks.create @configuration, "/rails/root"
28          end
29        end
30      end

该测试用例为偶现失败。
测试过程activerecord通过rubygem-sqlite3客户端工具连接sqlite数据库,初始化database后使用assert_called_with()函数判断database是否存在,若不存在返回false。
可能导致异常的原因:执行测试用例为多线程方式,由于编译平台存在资源抢占,且sqlite3数据库在多线程操作时不稳定,创建数据库线程时未执行完,从而导致执行判断数据库是否存在时的用例失败。

caodongxia 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
5329419 openeuler ci bot 1632792936
1
https://gitee.com/src-openeuler/rubygem-activerecord.git
git@gitee.com:src-openeuler/rubygem-activerecord.git
src-openeuler
rubygem-activerecord
rubygem-activerecord

搜索帮助

Cb406eda 1850385 E526c682 1850385