parallel_tests 2.6.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ce6ccd3931181ca1ec88b0a66c89423be032e64
4
- data.tar.gz: 4b2de8a2931ed83c775fdaa60d486407a4e518ad
3
+ metadata.gz: 1585f19962c54d1fd36e9ad3408da061ecc38fc9
4
+ data.tar.gz: 20f825eb1ff02a6f39788a4913181e7c4c94597e
5
5
  SHA512:
6
- metadata.gz: 524d9dbcb29345dfbfea0ba8e423c9766c2db6e87cbc1cfecbfecd65671ec971a5c390a06d7dbd40e45b37f2d920aeba1ddf178054c755bfd8e8a0300943d5d9
7
- data.tar.gz: 09ee314cdf3e62a05b846e77f1f92817af1571e1f1d735b63788146719bf2d0bdfdce9404c5aad9563ff4066e61fd47079a30a30579aaa8d8a57ca13d1aa4dbd
6
+ metadata.gz: ca6a18cf92d323a105d8ce304e8106edff9c59753c88bd30fac5d16daf95ec61406963797962c643d34147291d1d20aca40bc4fd7907e2ca723a61d48dcedc58
7
+ data.tar.gz: 9ccf49b6ad98dac027cc2bd4494d17d4fb531a02b3863071f1f45ef94110c78241240180979638a9b7a7af36f93568b32f9b3d3f93a9f12cb7b868c725c163ad
@@ -26,8 +26,14 @@ module ParallelTests
26
26
 
27
27
  def execute_in_parallel(items, num_processes, options)
28
28
  Tempfile.open 'parallel_tests-lock' do |lock|
29
- return Parallel.map(items, :in_threads => num_processes) do |item|
29
+ progress_indicator = simulate_output_for_ci if options[:serialize_stdout]
30
+
31
+ Parallel.map(items, :in_threads => num_processes) do |item|
30
32
  result = yield(item)
33
+ if progress_indicator && progress_indicator.alive?
34
+ progress_indicator.exit
35
+ puts
36
+ end
31
37
  reprint_output(result, lock.path) if options[:serialize_stdout]
32
38
  result
33
39
  end
@@ -294,5 +300,16 @@ module ParallelTests
294
300
  val = ENV["PARALLEL_TEST_FIRST_IS_1"]
295
301
  ['1', 'true'].include?(val)
296
302
  end
303
+
304
+ # CI systems often fail when there is no output for a long time, so simulate some output
305
+ def simulate_output_for_ci
306
+ Thread.new do
307
+ interval = ENV.fetch('PARALLEL_TEST_HEARTBEAT_INTERVAL', 60).to_f
308
+ loop do
309
+ sleep interval
310
+ print '.'
311
+ end
312
+ end
313
+ end
297
314
  end
298
315
  end
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '2.6.0'
2
+ VERSION = Version = '2.7.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-15 00:00:00.000000000 Z
11
+ date: 2016-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  version: '0'
82
82
  requirements: []
83
83
  rubyforge_project:
84
- rubygems_version: 2.4.5.1
84
+ rubygems_version: 2.5.1
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: Run Test::Unit / RSpec / Cucumber / Spinach in parallel