ci-queue 0.32.0 → 0.34.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: ffbfc433f36b0b8dcb19d9c2f17ab4227815dc1a7211b111d33a98fbc0ae6bf8
4
- data.tar.gz: b84dc1389720a40520c74d57ae65d3161e5b00b91762d8ffc3a6cb4734d2d7dd
3
+ metadata.gz: c8f29e9746a1f72fb24fe886360f2d1b5699dd71adfd9bf76207138530d093e6
4
+ data.tar.gz: 965eef8b0fc0d3c8f5d57c7169d07ecca8dda5926fef6744ca106c185aa9563f
5
5
  SHA512:
6
- metadata.gz: 3c7207ab7fa5995ea934212f5c5a2dac179b8bcdf67221040fc8e6e41e4653570b34e9aff18e4bbb647797ea4792e93d962c71d4a354ba57399a4114c6de7e61
7
- data.tar.gz: '027848c07795e66c33fccb820465e9df3ff1fe2c75864192159e9e8902bbc679fcb21963a272b4f0d15ad0844b7524799ade11a02e3a8e45c276ec705f367a7c'
6
+ metadata.gz: 39cf4530f2030dd2a9e9944c7e2df5e3f5dd63dee11ee41d840c42c774abce5a74205a04c74ad435ce4766369cb20347948fab640df0c70f1ded6a5654aef19f
7
+ data.tar.gz: 95bfa2a021df6d49fcd3104a647f99e5688d5160fd65bc1b096d4fdf6f0b2b06a3eeaa37caf8eb5bbb2b488a09b64742bcb848ebcf74fdee181dc51cb2143e0c
@@ -20,6 +20,11 @@ module CI
20
20
  @config = config
21
21
  @progress = 0
22
22
  @total = tests.size
23
+ @shutdown = false
24
+ end
25
+
26
+ def shutdown!
27
+ @shutdown = true
23
28
  end
24
29
 
25
30
  def distributed?
@@ -64,7 +69,7 @@ module CI
64
69
  end
65
70
 
66
71
  def poll
67
- while config.circuit_breakers.none?(&:open?) && !max_test_failed? && test = @queue.shift
72
+ while !@shutdown && config.circuit_breakers.none?(&:open?) && !max_test_failed? && test = @queue.shift
68
73
  yield index.fetch(test)
69
74
  end
70
75
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CI
4
4
  module Queue
5
- VERSION = '0.32.0'
5
+ VERSION = '0.34.0'
6
6
  DEV_SCRIPTS_ROOT = ::File.expand_path('../../../../../redis', __FILE__)
7
7
  RELEASE_SCRIPTS_ROOT = ::File.expand_path('../redis', __FILE__)
8
8
  end
@@ -53,7 +53,7 @@ module Minitest
53
53
 
54
54
  def body
55
55
  error = test.failure
56
- message = if error.is_a?(MiniTest::UnexpectedError)
56
+ message = if error.is_a?(Minitest::UnexpectedError)
57
57
  "#{error.exception.class}: #{error.exception.message}"
58
58
  else
59
59
  error.exception.message
@@ -234,7 +234,11 @@ module Minitest
234
234
  failed = false
235
235
  end
236
236
 
237
- if failed
237
+ if failed && queue.config.failing_test && queue.config.failing_test != example.id
238
+ # When we do a bisect, we don't care about the result other than the test we're running the bisect on
239
+ result.mark_as_flaked!
240
+ failed = false
241
+ elsif failed
238
242
  queue.report_failure!
239
243
  else
240
244
  queue.report_success!
@@ -259,15 +263,15 @@ module Minitest
259
263
  end
260
264
  end
261
265
 
262
- MiniTest.singleton_class.prepend(MiniTest::Queue)
263
- if defined? MiniTest::Result
264
- MiniTest::Result.prepend(MiniTest::Requeueing)
265
- MiniTest::Result.prepend(MiniTest::Flakiness)
266
- MiniTest::Result.prepend(MiniTest::WithTimestamps)
266
+ Minitest.singleton_class.prepend(Minitest::Queue)
267
+ if defined? Minitest::Result
268
+ Minitest::Result.prepend(Minitest::Requeueing)
269
+ Minitest::Result.prepend(Minitest::Flakiness)
270
+ Minitest::Result.prepend(Minitest::WithTimestamps)
267
271
  else
268
- MiniTest::Test.prepend(MiniTest::Requeueing)
269
- MiniTest::Test.prepend(MiniTest::Flakiness)
270
- MiniTest::Test.prepend(MiniTest::WithTimestamps)
272
+ Minitest::Test.prepend(Minitest::Requeueing)
273
+ Minitest::Test.prepend(Minitest::Flakiness)
274
+ Minitest::Test.prepend(Minitest::WithTimestamps)
271
275
 
272
276
  module MinitestBackwardCompatibility
273
277
  def source_location
@@ -278,5 +282,5 @@ else
278
282
  self.class.name
279
283
  end
280
284
  end
281
- MiniTest::Test.prepend(MinitestBackwardCompatibility)
285
+ Minitest::Test.prepend(MinitestBackwardCompatibility)
282
286
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci-queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.0
4
+ version: 0.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-20 00:00:00.000000000 Z
11
+ date: 2023-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  - !ruby/object:Gem::Version
240
240
  version: '0'
241
241
  requirements: []
242
- rubygems_version: 3.4.16
242
+ rubygems_version: 3.4.17
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: Distribute tests over many workers using a queue