Go App Engine – 测试 Memcache 服务故障

huangapple go评论87阅读模式
英文:

Go App Engine - Testing Memcache service failures

问题

我正在尝试测试我的Go GAE应用程序中的失败路径。我正在使用包含的appengine/aetest包进行测试,该包创建一个dev_appserver.py子进程来处理API调用,但似乎无法告诉API存根开始失败(它总是正常工作)。

我尝试过的一个有希望的方法是使用withmock来实际模拟memcache包,并使函数返回我想要的一系列错误。不幸的是,我发现withmock与App Engine不太兼容。

英文:

I am trying to test the failure paths in my Go GAE application. I am testing using the included appengine/aetest package that creates a dev_appserver.py subprocess to handle API calls, however it seems impossible to tell the API stub to start failing (it always works).

A promising thing I tried was using withmock to actually mock out the memcache package and make the functions return the series of errors I'd like. Alas I found withmock is not very compatible with App Engine.

答案1

得分: 1

这听起来像一个很好的功能请求。请在App Engine问题跟踪器上提交一个请求!

英文:

This sounds like a good feature request. Please file one over on the App Engine issue tracker!

huangapple
  • 本文由 发表于 2013年10月30日 14:53:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/19675678.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定