ci-queue 0.14.0 → 0.14.1

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: 69f2c43d6407cb468d6f0288aa8b32c1a41435b2
4
- data.tar.gz: '018ef68ddc3ddb821053174180c2380aefcb24f8'
3
+ metadata.gz: e9c5f96cd424f499c6a46f3ffbfa21023547b4cc
4
+ data.tar.gz: 39d18875123ae38c81c8788a7776aa99faf4c532
5
5
  SHA512:
6
- metadata.gz: 5cff6680090e17d0d342a44b73239b2a0075fbbecab53aa534b5e18722ca363e79398ab5685ba5e103b5e672f7b3a1150d0029275669407ede79c9b0df0f2ba0
7
- data.tar.gz: f14aba376b3d2484f80273e7020b650cad4c8dff046a139eafac1273160646e1676d083f3252938e12882d3cbddac64cc33542d6fd81f37affc4c82646a8e4a3
6
+ metadata.gz: 489781b113ce8f0834516253a49e4135c75a976ebc42d1320a1cca5145c85ff15ab2fd6c4b35456d6d8abf53d8e43ec0d106570a85ce029ebfc750892f990a4d
7
+ data.tar.gz: 7e32d21f7bb3ee434a8e86f7ecd4d866bd6c9b42ddfe3f3a241c6030df2ca5f544b2ccfb7d781bf1c35986b7611cedbdf780152b6b8bcd80c9ce7143c82a6105
@@ -31,6 +31,10 @@ module CI
31
31
  stat_names.zip(stats.values_at(*stat_names).map(&:to_f))
32
32
  end
33
33
 
34
+ def reset_stats(stat_names)
35
+ stat_names.each { |s| stats.delete(s) }
36
+ end
37
+
34
38
  private
35
39
 
36
40
  attr_reader :stats
@@ -51,6 +51,14 @@ module CI
51
51
  stat_names.zip(counts.map { |values| values.map(&:to_f).inject(:+).to_f }).to_h
52
52
  end
53
53
 
54
+ def reset_stats(stat_names)
55
+ redis.pipelined do
56
+ stat_names.each do |stat_name|
57
+ redis.hdel(key(stat_name), config.worker_id)
58
+ end
59
+ end
60
+ end
61
+
54
62
  private
55
63
 
56
64
  attr_reader :config, :redis
@@ -1,6 +1,6 @@
1
1
  module CI
2
2
  module Queue
3
- VERSION = '0.14.0'
3
+ VERSION = '0.14.1'
4
4
  DEV_SCRIPTS_ROOT = ::File.expand_path('../../../../../redis', __FILE__)
5
5
  RELEASE_SCRIPTS_ROOT = ::File.expand_path('../redis', __FILE__)
6
6
  end
@@ -25,7 +25,7 @@ module Minitest
25
25
  end
26
26
 
27
27
  def success?
28
- errors == 0 && failures == 0
28
+ build.error_reports.empty?
29
29
  end
30
30
 
31
31
  def record(*)
@@ -37,6 +37,7 @@ module Minitest
37
37
  end
38
38
 
39
39
  def retry_command
40
+ reset_counters
40
41
  retry_queue = queue.retry_queue
41
42
  unless retry_queue.exhausted?
42
43
  self.queue = retry_queue
@@ -156,6 +157,10 @@ module Minitest
156
157
  return status.success?
157
158
  end
158
159
 
160
+ def reset_counters
161
+ queue.build.reset_stats(BuildStatusRecorder::COUNTERS)
162
+ end
163
+
159
164
  def populate_queue
160
165
  Minitest.queue.populate(Minitest.loaded_tests, random: ordering_seed, &:id)
161
166
  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.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-27 00:00:00.000000000 Z
11
+ date: 2018-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ansi