minitest-distributed 0.2.9 → 0.2.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1dc9ad4333958d6197869544c8fd47f6bc0f6ccdb5fe2203fe4af1ed348164ed
4
- data.tar.gz: fad3b8564ad602cf2209ebff92b1ddeef601f2ae3ccdfc94d67820e077a05943
3
+ metadata.gz: a59856c10fd7a252d95609f66242a4c9706f91d6e7fb57a226914a7e816e04ee
4
+ data.tar.gz: 024e72b9de525b048dbdc0a6f97b7721a24fd39803030dec85cf080832dfcfd3
5
5
  SHA512:
6
- metadata.gz: 833c450f354affcdab9f7d3939dd5ac5de52de2a586758cf46b8b21a60073712dca466d2847aa6a918eea2e68d8013e6d53dee1fc335fc7dcca97edca7785cce
7
- data.tar.gz: 6d35405c22570d2c9c9628e35330ce2e198d77ec8610e88568d07e7b3d7453323872db88e7b99de11148e396e56487be3c98c540110127cbaaa53ab21307da0a
6
+ metadata.gz: 401e8fcb14acf32f0e3904038e30d15bbc801e1cf7672c93b16c09d506829c46dc58fff771766ddd508e46d8740748a5688a8c0125ce19bafa8fe2dd16a81909
7
+ data.tar.gz: d0082e9f6d731b73651e26c6a6ea943ff782b93cca2c11de19308b1e97a415f06450770a858ea6e176153df5183710a6dd2f2bc327474dde930b1d8685f40c08
data/README.md CHANGED
@@ -114,7 +114,7 @@ Bug reports and pull requests are welcome on GitHub at
114
114
  https://github.com/Shopify/minitest-distributed. This project is intended to
115
115
  be a safe, welcoming space for collaboration, and contributors are expected to
116
116
  adhere to the [code of
117
- conduct](https://github.com/Shopify/minitest-distributed/blob/master/CODE_OF_CONDUCT.md).
117
+ conduct](https://github.com/Shopify/minitest-distributed/blob/main/CODE_OF_CONDUCT.md).
118
118
 
119
119
  **Development**
120
120
 
@@ -134,7 +134,7 @@ To bootstrap a local development environment:
134
134
  - To install this gem onto your local machine, run `bin/rake install`.
135
135
  - Only people at Shopify can release a new version to
136
136
  [rubygems.org](https://rubygems.org). To do so, update the `VERSION` constant
137
- in `version.rb`, and merge to master. Shipit will take care of building the
137
+ in `version.rb`, and merge to main. Shipit will take care of building the
138
138
  `.gem` bundle, and pushing it to rubygems.org.
139
139
 
140
140
  ## License
@@ -126,7 +126,7 @@ module Minitest
126
126
  def produce(test_selector:)
127
127
  # Whoever ends up creating the consumer group will act as leader,
128
128
  # and publish the list of tests to the stream.
129
-
129
+ consumer_group_exists = false
130
130
  initial_attempt = begin
131
131
  # When using `redis.multi`, the second DEL command gets executed even if the initial GROUP
132
132
  # fails. This is bad, because only the leader should be issuing the DEL command.
@@ -144,12 +144,14 @@ module Minitest
144
144
  # exists. In our case, it means that another worker managed to successfully
145
145
  # run the XGROUP command, and will act as leader and publish the tests.
146
146
  # This worker can simply move on the consumer mode.
147
- return
147
+ consumer_group_exists = true
148
148
  else
149
149
  raise
150
150
  end
151
151
  end
152
152
 
153
+ return if consumer_group_exists
154
+
153
155
  tests = T.let([], T::Array[Minitest::Runnable])
154
156
  tests = if initial_attempt
155
157
  # If this is the first attempt for this run ID, we will schedule the full
@@ -120,7 +120,7 @@ module Minitest
120
120
 
121
121
  sig { params(message: String).returns(String) }
122
122
  def truncate_message(message)
123
- T.must(message.lines.first).chomp.gsub(/\e\[[^m]+m/, "")
123
+ T.must(message.lines.first).chomp.gsub(/\e\[[^m]+m/, "").gsub(/[\x00-\x1F\x7F]/, "")
124
124
  end
125
125
 
126
126
  sig { params(results: T::Array[Minitest::Result]).returns(T::Hash[String, Numeric]) }
@@ -20,7 +20,7 @@ module Minitest
20
20
  super
21
21
  end
22
22
 
23
- sig { override.params(klass: Class, name: String).void }
23
+ sig { override.params(klass: T::Class[T.anything], name: String).void }
24
24
  def prerecord(klass, name)
25
25
  T.must(@file).puts("#{klass}##{name}")
26
26
  T.must(@file).flush
@@ -3,6 +3,6 @@
3
3
 
4
4
  module Minitest
5
5
  module Distributed
6
- VERSION = "0.2.9"
6
+ VERSION = "0.2.10"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-distributed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Willem van Bergen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-16 00:00:00.000000000 Z
11
+ date: 2023-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  requirements: []
175
- rubygems_version: 3.3.3
175
+ rubygems_version: 3.4.18
176
176
  signing_key:
177
177
  specification_version: 4
178
178
  summary: Distributed test executor plugin for Minitest