在Mongoid-gridfs上使用滑轨进行黄瓜测试的'ERROR Mongo :: OperationFailure' [英] 'ERROR Mongo::OperationFailure' from Cucumber testing with rails on mongoid-gridfs

查看:43
本文介绍了在Mongoid-gridfs上使用滑轨进行黄瓜测试的'ERROR Mongo :: OperationFailure'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行黄瓜测试时出现此奇怪错误:

I am getting this weird error while running cucumber test:

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}

我有一个类似场景的列表,其中第一个场景通过了,但是所有其他随后的场景都失败了.我搜索了它,发现索引存在问题.但是,我不确定要编写什么查询.此外,我可以在开发的mongo上添加查询.我想确保索引也在测试中完成.如果有人对此有任何想法,请放心.

I have a list of similar scenarios, where first scenario passes but all the other following scenario fails. I searched for it and I found that there is problem with indexing. But, I am not sure about what query to write. Furthermore, I can add the query on the mongo of the development. I want to make sure that the indexing is done in test too. If anyone has any idea on this, feel free.

推荐答案

也许现在不会发生此错误.一年后

Maybe this error not occur now. one year after

这篇关于在Mongoid-gridfs上使用滑轨进行黄瓜测试的'ERROR Mongo :: OperationFailure'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆