我正在关注这个基本教程,似乎这些测试应该在最多 2 秒内运行,但我得到5 次测试的41 秒。
我用 ChefSpec 运行--profile
,这就是结果
Top 8 slowest examples (41.17 seconds, 99.8% of total time):
webserver_test::default When run on CentOS 7.2.1511 installs httpd
5.21 seconds ./spec/unit/recipes/default_spec.rb:20
webserver_test::default When run on Ubuntu 14.04 converges successfully
5.17 seconds ./spec/unit/recipes/default_spec.rb:39
webserver_test::default When run on CentOS 7.2.1511 enables the httpd service
5.16 seconds ./spec/unit/recipes/default_spec.rb:24
webserver_test::default When run on Ubuntu 14.04 starts the apache2 service
5.15 seconds ./spec/unit/recipes/default_spec.rb:51
webserver_test::default When run on CentOS 7.2.1511 converges successfully
5.15 seconds ./spec/unit/recipes/default_spec.rb:16
webserver_test::default When run on Ubuntu 14.04 installs apache2
5.13 seconds ./spec/unit/recipes/default_spec.rb:43
webserver_test::default When run on CentOS 7.2.1511 starts the httpd service
5.11 seconds ./spec/unit/recipes/default_spec.rb:28
webserver_test::default When run on Ubuntu 14.04 enables apache2 service
5.1 seconds ./spec/unit/recipes/default_spec.rb:47
Finished in 41.26 seconds (files took 6.58 seconds to load)
8 个示例,0 次失败