class ParallelTests::CLI

def simulate_output_for_ci(simulate)

CI systems often fail when there is no output for a long time, so simulate some output
def simulate_output_for_ci(simulate)
  if simulate
    progress_indicator = Thread.new do
      interval = Float(ENV.fetch('PARALLEL_TEST_HEARTBEAT_INTERVAL', 60))
      loop do
        sleep interval
        print '.'
      end
    end
    test_results = yield
    progress_indicator.exit
    test_results
  else
    yield
  end
end