<commit_before>class Wt_streamingconfigserviceTest < MiniTest::Chef::TestCase
  require 'net/http'
  require 'yajl'

  def test_healthcheck
    sleep(15)
    res = Net::HTTP.get(node['fqdn'],"/healthcheck",9000)
    status = Yajl::Parser.parse(res)
    status["checks"].each do |check, value|
      assert_equal 'true', value["healthy"]
    end
  end
end
<commit_msg>Retried healthcheck connection until it succeeded, or 15 seconds passed.<commit_after>class Wt_streamingconfigserviceTest < MiniTest::Chef::TestCase
  require 'net/http'
  require 'yajl'

  def test_healthcheck
    ago = Time.now
    begin 
      res = Net::HTTP.get(node['fqdn'],"/healthcheck",9000)
      status = Yajl::Parser.parse(res)
      status["checks"].each do |check, value|
        assert_equal 'true', value["healthy"]
      end
    rescue
      retry unless ago+15 < Time.now
      flunk "#{node['fqdn']}:9000/healthcheck did not respond within 15 seconds"
    end
  end
end

{'fraction_non_alphanumeric': 0.12343096234309624, 'fraction_numerical': 0.02092050209205021, 'mean_word_length': 3.7611940298507465, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2498509', 'n_tokens_mistral': 330, 'n_tokens_neox': 312, 'n_words': 73}