故障运行RSpec的测试为WebSphere自由档案Buildpack

问题描述:

我使用了开放源码软件Cloud Foundry的自由开源回购简介Buildpack并运行到以下故障执行bundle exec rspec故障运行RSpec的测试为WebSphere自由档案Buildpack

681例,3次失败时 失败例子:

rspec ./spec/bin/compile_spec.rb:49 # compile script should work with the liberty WEB-INF case 
rspec ./spec/bin/compile_spec.rb:65 # compile script should also work with the zipped up server case 
rspec ./spec/bin/compile_spec.rb:82 # compile script pass environment variable directory 

3个故障都有一个共同的叠层...

1) compile script should work with the liberty WEB-INF case 
Failure/Error: expect(result).to be_success 
expected `#<Process::Status: pid 84398 exit 1>.success?` to return true, got false 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-expectations-3.0.4/lib/rspec/expectations/fail_with.rb:30:in `fail_with' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-expectations-3.0.4/lib/rspec/expectations/handler.rb:37:in `handle_failure' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-expectations-3.0.4/lib/rspec/expectations/handler.rb:48:in `handle_matcher' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-expectations-3.0.4/lib/rspec/expectations/expectation_target.rb:54:in `to' 
# ./spec/bin/compile_spec.rb:59:in `block (5 levels) in <top (required)>' 
# /Users/kelapr/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/open3.rb:208:in `popen_run' 
# /Users/kelapr/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/open3.rb:90:in `popen3' 
# ./spec/bin/compile_spec.rb:53:in `block (4 levels) in <top (required)>' 
# ./spec/bin/compile_spec.rb:124:in `with_memory_limit' 
# ./spec/bin/compile_spec.rb:52:in `block (3 levels) in <top (required)>' 
# /Users/kelapr/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir' 
# ./spec/bin/compile_spec.rb:50:in `block (2 levels) in <top (required)>' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:148:in `instance_exec' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:148:in `block in run' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:301:in `with_around_example_hooks' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:145:in `run' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/example_group.rb:494:in `block in run_examples' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/example_group.rb:490:in `map' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/example_group.rb:490:in `run_examples' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/example_group.rb:457:in `run' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:112:in `block (2 levels) in run_specs' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:112:in `map' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:112:in `block in run_specs' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/reporter.rb:54:in `report' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:108:in `run_specs' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:86:in `run' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:70:in `run' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:38:in `invoke' 
# ./vendor/bundle/ruby/1.9.1/gems/rspec-core-3.0.4/exe/rspec:4:in `<top (required)>' 
# ./vendor/bundle/ruby/1.9.1/bin/rspec:23:in `load' 
# ./vendor/bundle/ruby/1.9.1/bin/rspec:23:in `<main>' 

罐有人指引我们如何解决这些故障似乎从一个Dir.mktmpdir块内Open3.popen3调用干。这些来自主分支的结果https://github.com/cloudfoundry/ibm-websphere-liberty-buildpack/

-Thanks。

我在Travis CI系统中看不到这样的故障。另外,在本地机器上进行测试并不会导致任何故障。在测试输出中是否有其他错误?在出现故障的情况下,输出中应该有以stdout:stderr:开头的消息。

这些失败的长时间运行测试的问题是堆栈跟踪在确定实际发生的事情时非常糟糕。我们确定这些故障的根本原因为缺少网络连接