Dee*_*ane 6 ruby-on-rails cucumber mongoid
我在运行黄瓜测试时遇到这个奇怪的错误:
ERROR Mongo::OperationFailure: Database command 'filemd5' failed: {"errmsg"=>"exception: best guess plan requested, but scan and order required: query: { files_id: ObjectId('4d1abab3a15c84139c00006e') } order: { files_id: 1, n: 1 } choices: { $natural: 1 } ", "code"=>13284, "ok"=>0.0}
Run Code Online (Sandbox Code Playgroud)
我有一个类似场景的列表,其中第一个场景通过,但所有其他后续场景都失败.我搜索了它,发现索引存在问题.但是,我不确定要写什么查询.此外,我可以在开发的mongo上添加查询.我想确保索引也在测试中完成.如果有人对此有任何想法,请随意.
| 归档时间: |
|
| 查看次数: |
505 次 |
| 最近记录: |