ci-queue 0.94.0 → 0.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ci/queue/configuration.rb +15 -1
- data/lib/ci/queue/version.rb +1 -1
- data/lib/minitest/queue/junit_reporter.rb +11 -3
- data/lib/minitest/queue/runner.rb +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8c3ced29dc916918cd28d47f312be55e014fd5836ab0c91d1e2eab17c9484951
|
|
4
|
+
data.tar.gz: 3ac890363a4a861ca2c3420c24490dff1ffd89dfb890b8d0fd71062ccf812003
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 27f198e8d9201f56112cc29bb3fcaa8518e7d5ddedc629d5eba13de06e0b936a8e809d47162d088f57d5ff614d3c4f92f003f786de62310ae421498e9913d8a9
|
|
7
|
+
data.tar.gz: 2c5f925d28012585afa8212cbb14afb1966cb0a2e5dbeaa9927486b2e96fb2c96d595f06ef7aa5ab6b97e5c238e5bca01e3572273a8a5fa9e8be357f54c44bf5
|
data/Gemfile.lock
CHANGED
|
@@ -172,7 +172,21 @@ module CI
|
|
|
172
172
|
end
|
|
173
173
|
|
|
174
174
|
def flaky?(test)
|
|
175
|
-
|
|
175
|
+
lazy_normalized_flaky_tests.include?(normalize_test_id(test.id))
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
def normalize_test_id(id)
|
|
179
|
+
id
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
def lazy_normalized_flaky_tests
|
|
183
|
+
@normalized_flaky_tests ||= @flaky_tests.to_set { |test_id| normalize_test_id(test_id) }
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
def test_id_normalizer=(normalizer)
|
|
187
|
+
normalizer = normalizer.to_proc if Method === normalizer
|
|
188
|
+
define_singleton_method(:normalize_test_id, normalizer)
|
|
189
|
+
@normalized_flaky_tests = nil
|
|
176
190
|
end
|
|
177
191
|
|
|
178
192
|
def seed
|
data/lib/ci/queue/version.rb
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require 'minitest/reporters'
|
|
4
4
|
require 'rexml/document'
|
|
5
5
|
require 'fileutils'
|
|
6
|
+
require 'tempfile'
|
|
6
7
|
|
|
7
8
|
module Minitest
|
|
8
9
|
module Queue
|
|
@@ -40,9 +41,16 @@ module Minitest
|
|
|
40
41
|
def report
|
|
41
42
|
super
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
dir = File.dirname(@report_path)
|
|
45
|
+
FileUtils.mkdir_p(dir)
|
|
46
|
+
tmp = Tempfile.new([File.basename(@report_path), '.tmp'], dir)
|
|
47
|
+
begin
|
|
48
|
+
format_document(generate_document, tmp)
|
|
49
|
+
tmp.close
|
|
50
|
+
File.rename(tmp.path, @report_path)
|
|
51
|
+
rescue
|
|
52
|
+
tmp.close!
|
|
53
|
+
raise
|
|
46
54
|
end
|
|
47
55
|
end
|
|
48
56
|
|
|
@@ -254,7 +254,9 @@ module Minitest
|
|
|
254
254
|
step(yellow("The failing test was the first test in the test order so there is nothing to bisect."))
|
|
255
255
|
File.write('log/test_order.log', "")
|
|
256
256
|
File.write('log/bisect_test_details.log', "")
|
|
257
|
-
|
|
257
|
+
# Bisect ran successfully; there is simply nothing to bisect against.
|
|
258
|
+
# Reserve non-zero exits for cases where the bisect could not run (see failing_test_present? above).
|
|
259
|
+
exit! 0
|
|
258
260
|
end
|
|
259
261
|
|
|
260
262
|
failing_order = queue.candidates
|
|
@@ -263,7 +265,10 @@ module Minitest
|
|
|
263
265
|
step(yellow("The bisection was inconclusive, there might not be any leaky test here."))
|
|
264
266
|
File.write('log/test_order.log', "")
|
|
265
267
|
File.write('log/bisect_test_details.log', "")
|
|
266
|
-
|
|
268
|
+
# Bisect ran successfully; the failure did not reproduce on the narrowed-down order.
|
|
269
|
+
# This is the expected outcome for genuinely flaky tests (timing/async) rather than order-dependent ones.
|
|
270
|
+
# Reserve non-zero exits for cases where the bisect could not run.
|
|
271
|
+
exit! 0
|
|
267
272
|
else
|
|
268
273
|
step(green('The following command should reproduce the leak on your machine:'), collapsed: false)
|
|
269
274
|
command = %w(bundle exec minitest-queue --queue - run)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ci-queue
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.96.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jean Boussier
|
|
@@ -319,7 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
319
319
|
- !ruby/object:Gem::Version
|
|
320
320
|
version: '0'
|
|
321
321
|
requirements: []
|
|
322
|
-
rubygems_version: 4.0.
|
|
322
|
+
rubygems_version: 4.0.11
|
|
323
323
|
specification_version: 4
|
|
324
324
|
summary: Distribute tests over many workers using a queue
|
|
325
325
|
test_files: []
|