我尝试运行
时收到此错误RACK_ENV=test be rails test test/system/service_provider_map_test.rb —seed 48088
Java HotSpot(TM) 64-Bit Server VM warning: Cannot open file logs/gc.log due to No such file or directory
然后测试结果出现此错误
等待群集状态[绿色]和[1]节点时超时 /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:551:in { {1}}阻止(2级)__wait_for_status'从 /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:542:in { {1}}阻止__wait_for_status'从 /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/2.4.0/timeout.rb:108:in
sleep': execution expired (Timeout::Error) from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:551:in
__ wait_for_status'从 /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:364:in { {1}}开始'从 /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:52:inloop' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:542:in
start_elasticsearch'从 /Users/patrickward/Desktop/esh/SDR/test/application_system_test_case.rb:12:intimeout' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:541:in
'从 /Users/patrickward/Desktop/esh/SDR/test/system/service_provider_map_test.rb:2:inwait_for_green' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/elasticsearch-extensions-0.0.26/lib/elasticsearch/extensions/test/cluster.rb:280:in
'从 /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/test_unit/test_requirer.rb:14:in {_ 1}}阻止了require_files'从 /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/test_unit/test_requirer.rb:13:instart' from /Users/patrickward/Desktop/esh/SDR/test/support/elasticsearch_helpers.rb:38:in
require_files&#39;从 /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/test_unit/minitest_plugin.rb:96:in<class:ApplicationSystemTestCase>' from /Users/patrickward/Desktop/esh/SDR/test/application_system_test_case.rb:6:in
阻止init_plugins&#39;从 /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/minitest-5.11.3/lib/minitest.rb:79:inrequire' from /Users/patrickward/Desktop/esh/SDR/test/system/service_provider_map_test.rb:2:in
init_plugins&#39;从 /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/minitest-5.11.3/lib/minitest.rb:130:inrequire' from /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/test_unit/test_requirer.rb:14:in
运行&#39;从 /Users/patrickward/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/minitest-5.11.3/lib/minitest.rb:63:in `在自动运行中阻止&#39;
对于上下文:我在Mac OS上运行,我们将非常感谢任何帮助
答案 0 :(得分:0)
Java HotSpot(TM) 64-Bit Server VM warning: Cannot open file logs/gc.log due to No such file or directory
不是错误,它是一种警告和误导。真正的错误消息是
等待群集状态[绿色]和[1]节点
时超时elasticsearch-ruby库有一个测试代码,它自己启动一个集群。 它来自这个测试。 https://github.com/elastic/elasticsearch-ruby/blob/6.x/elasticsearch-extensions/lib/elasticsearch/extensions/test/cluster.rb行:579
message = "\nTimeout while waiting for cluster status [#{status}]"
message += " and [#{arguments[:number_of_nodes]}] nodes" if arguments[:number_of_nodes]
__log message.ansi(:red, :bold)
然而,有一个错误指出了你的问题。 https://github.com/elastic/elasticsearch-ruby/issues/371 您可能需要将elasticsearch-ruby版本升级到更新版本