test-queue 0.9.0 → 0.10.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
  SHA256:
3
- metadata.gz: 0270d50dbfc6b383940e726188a854e9cbba7b9fa5f1979f85e04ade484f04f9
4
- data.tar.gz: 36990b90f5f47ccddabea471dd858aee75f29892640d4513e8023315a3dd71b8
3
+ metadata.gz: cf82719e0483ccba7f40a8a66ffdd0d262bd2ff79cae203055e730988eed1219
4
+ data.tar.gz: 584b68033ee5540cc1c2aaeeb1c391e04ff67b158e6c170975151397ea287c66
5
5
  SHA512:
6
- metadata.gz: b7aba755710f56ae58b21e4bfbbc07b0b3832a54933ec74555fd28ae9f101a957c8c3d6950def76b63c56f54217d7fecc0638909a98ac71d83c88236b43e6951
7
- data.tar.gz: c9435e822ed3abbec345791994be8aa8aa926bc8028bf1c14749f70a7e0a4821b92899dc89209e808f52c413e5073f07489aeb1096a58ecb77ed191a33c0f2d9
6
+ metadata.gz: 041b553cf8d565683e9bf304e043ca0e44346a14243969834d4dc5e3d98f8ada5c96ada0e42ad0da4d4ccc488322013b632b6f2cde4633908d7b526915c7af74
7
+ data.tar.gz: ac21ecddc2d3236e5b7de2bc0d138ac791d420efea33a43286294169fba4082329de1540c614153273cc0783e8897b9700bd24469fbad660168c22ec86c9ae65
@@ -38,10 +38,8 @@ module TestQueue
38
38
  end
39
39
  break if client.nil?
40
40
 
41
- # rubocop:disable Lint/IncompatibleIoSelectWithFiberScheduler
42
41
  # This false positive will be resolved by https://github.com/rubocop/rubocop/pull/11830.
43
42
  _r, _w, e = IO.select([client], nil, [client], nil)
44
- # rubocop:enable Lint/IncompatibleIoSelectWithFiberScheduler
45
43
  break unless e.empty?
46
44
 
47
45
  if (data = client.read(65536))
@@ -12,17 +12,31 @@ module TestQueue
12
12
  class RSpec < Runner
13
13
  def initialize
14
14
  super(TestFramework::RSpec.new)
15
+
16
+ @rspec = ::RSpec::Core::QueueRunner.new
17
+ end
18
+
19
+ def start_master
20
+ seed_notification = ::RSpec::Core::Notifications::SeedNotification.new(@rspec.configuration.seed, seed_used?)
21
+ puts "#{seed_notification.fully_formatted}\n"
22
+
23
+ super
15
24
  end
16
25
 
17
26
  def run_worker(iterator)
18
- rspec = ::RSpec::Core::QueueRunner.new
19
- rspec.run_each(iterator).to_i
27
+ @rspec.run_each(iterator).to_i
20
28
  end
21
29
 
22
30
  def summarize_worker(worker)
23
31
  worker.summary = worker.lines.grep(/ examples?, /).first
24
32
  worker.failure_output = worker.output[/^Failures:\n\n(.*)\n^Finished/m, 1]
25
33
  end
34
+
35
+ private
36
+
37
+ def seed_used?
38
+ @rspec.configuration.seed && @rspec.configuration.seed_used?
39
+ end
26
40
  end
27
41
  end
28
42
 
@@ -317,7 +317,9 @@ module TestQueue
317
317
 
318
318
  @server.connect_address.connect do |sock|
319
319
  sock.puts("TOKEN=#{@run_token}")
320
- sock.puts("NEW SUITE #{Marshal.dump([suite_name, path])}")
320
+ data = Marshal.dump([suite_name, path])
321
+ sock.puts("NEW SUITE #{data.bytesize}")
322
+ sock.write(data)
321
323
  end
322
324
  end
323
325
  end
@@ -507,8 +509,9 @@ module TestQueue
507
509
  worker = Marshal.load(data)
508
510
  worker_completed(worker)
509
511
  remote_workers -= 1
510
- when /\ANEW SUITE (.+)/
511
- suite_name, path = Marshal.load($1)
512
+ when /\ANEW SUITE (\d+)/
513
+ data = sock.read($1.to_i)
514
+ suite_name, path = Marshal.load(data)
512
515
  enqueue_discovered_suite(suite_name, path)
513
516
  when /\AKABOOM/
514
517
  # worker reporting an abnormal number of test failures;
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TestQueue
4
- VERSION = '0.9.0'
4
+ VERSION = '0.10.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aman Gupta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-13 00:00:00.000000000 Z
11
+ date: 2023-06-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: minitest/rspec parallel test runner for CI environments
14
14
  email: ruby@tmm1.net