rake_test_loader.rb - 堆栈级别太深
`--> rake test
Coverage report generated for Unit Tests to /home/chris-kun/code/thirsty/coverage. 0 / 0 LOC (0.0%) covered.
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/rake_test_loader.rb:9: stack level too deep (SystemStackError)
rake aborted!
Command failed with status (1): [/usr/bin/ruby -I"lib:test" -I"/usr/lib/rub...]
Tasks: TOP => test
(See full trace by running task with --trace)
我只是不确定如何处理上述内容。我应该从哪里开始寻找问题?
更新: 因此,当我尝试从辅助文件中加载环境以进行单元测试时,似乎会触发错误。 (请参阅https://github.com/thumblemonks/riot/issues/45)
更新: 堆栈跟踪:
`--> bundle exec rake test --trace
** Invoke test (first_time)
** Execute test
** Invoke test:units (first_time)
** Invoke test:prepare (first_time)
** Execute test:prepare
** Execute test:units
** Invoke test:functionals (first_time)
** Invoke test:prepare
** Execute test:functionals
** Invoke test:integration (first_time)
** Invoke test:prepare
** Execute test:integration
/usr/lib/ruby/gems/1.9.1/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb:97: warning: already initialized constant Options
/usr/lib/ruby/gems/1.9.1/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb:339: warning: already initialized constant StringMax
/usr/lib/ruby/gems/1.9.1/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb:400: warning: already initialized constant RE_LWS
/usr/lib/ruby/gems/1.9.1/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb:401: warning: already initialized constant RE_TOKEN
/usr/lib/ruby/gems/1.9.1/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb:402: warning: already initialized constant RE_QUOTED_STRING
/usr/lib/ruby/gems/1.9.1/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb:403: warning: already initialized constant RE_PARAMETERS
Coverage report generated for Unit Tests to /home/chris-kun/code/thirsty/coverage. 0 / 0 LOC (0.0%) covered.
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/rake_test_loader.rb:9: stack level too deep (SystemStackError)
rake aborted!
Command failed with status (1): [/usr/bin/ruby -I"lib:test" -I"/usr/lib/rub...]
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in `call'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in `sh'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils_ext.rb:36:in `sh'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:80:in `ruby'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils_ext.rb:36:in `ruby'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/testtask.rb:99:in `block (2 levels) in define'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils_ext.rb:57:in `verbose'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/testtask.rb:98:in `block in define'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/usr/lib/ruby/gems/1.9.1/bin/rake:19:in `load'
/usr/lib/ruby/gems/1.9.1/bin/rake:19:in `<main>'
Tasks: TOP => test
`--> rake test
Coverage report generated for Unit Tests to /home/chris-kun/code/thirsty/coverage. 0 / 0 LOC (0.0%) covered.
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/rake_test_loader.rb:9: stack level too deep (SystemStackError)
rake aborted!
Command failed with status (1): [/usr/bin/ruby -I"lib:test" -I"/usr/lib/rub...]
Tasks: TOP => test
(See full trace by running task with --trace)
I'm just not sure what to do with the above. Where are the places I should start looking for issues?
UPDATE:
so the error seems to be triggering when I try and load the environment from inside a helper file for my unit tests. (see https://github.com/thumblemonks/riot/issues/45)
UPDATE:
stack trace:
`--> bundle exec rake test --trace
** Invoke test (first_time)
** Execute test
** Invoke test:units (first_time)
** Invoke test:prepare (first_time)
** Execute test:prepare
** Execute test:units
** Invoke test:functionals (first_time)
** Invoke test:prepare
** Execute test:functionals
** Invoke test:integration (first_time)
** Invoke test:prepare
** Execute test:integration
/usr/lib/ruby/gems/1.9.1/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb:97: warning: already initialized constant Options
/usr/lib/ruby/gems/1.9.1/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb:339: warning: already initialized constant StringMax
/usr/lib/ruby/gems/1.9.1/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb:400: warning: already initialized constant RE_LWS
/usr/lib/ruby/gems/1.9.1/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb:401: warning: already initialized constant RE_TOKEN
/usr/lib/ruby/gems/1.9.1/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb:402: warning: already initialized constant RE_QUOTED_STRING
/usr/lib/ruby/gems/1.9.1/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb:403: warning: already initialized constant RE_PARAMETERS
Coverage report generated for Unit Tests to /home/chris-kun/code/thirsty/coverage. 0 / 0 LOC (0.0%) covered.
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/rake_test_loader.rb:9: stack level too deep (SystemStackError)
rake aborted!
Command failed with status (1): [/usr/bin/ruby -I"lib:test" -I"/usr/lib/rub...]
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in `call'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in `sh'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils_ext.rb:36:in `sh'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:80:in `ruby'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils_ext.rb:36:in `ruby'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/testtask.rb:99:in `block (2 levels) in define'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils_ext.rb:57:in `verbose'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/testtask.rb:98:in `block in define'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/usr/lib/ruby/gems/1.9.1/bin/rake:19:in `load'
/usr/lib/ruby/gems/1.9.1/bin/rake:19:in `<main>'
Tasks: TOP => test
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
同样的事情也发生在我身上。您使用代码覆盖率工具吗?您将
require
放在哪里?它位于测试文件的第一行吗?The same thing happened to me. Are you using a code coverage tool? Where are you putting the
require
? Is it on the very first line of the test file?