minitest-distributed 0.2.5 → 0.2.6

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: '0208858e32026a813e488ae30c72ae1ab9e274574aa55f5eb873f50db170a9d4'
4
- data.tar.gz: 2e12cb8be3eb47009eb6aa30a5d58b9e7ef796a4e6851b02754fed3d3e261fdb
3
+ metadata.gz: 79efd42c684d8c5ccc46ed3e17fa181c2aa496729452c15c2a89bbbd1f8ba264
4
+ data.tar.gz: 5b0fe1f6d54ee09b7f01eb22d7331013d4538ffc761c3dd320e90e6ed32ce258
5
5
  SHA512:
6
- metadata.gz: e18ffe94425ae0726468df99f69d748a4c4d6744960d7f731079bd9dd2a927a924108d6a26e9e6383abe3d91bf311ae7619c666ae563605cacfd7f41c1b7de02
7
- data.tar.gz: 83ad27805dd3285a398e9266f7ed9d3a0f7e67468d3a9b8020300c7cc81b89b94222b424aa0ec2e5cb3dd231563d75d1c342f55c9c4918435a490697a326318e
6
+ metadata.gz: adfd17b4218db1a2a40e4093042491d751ba7a6d4995824fd6809e721084baf0ea97c2cec870606657c327fa244fad74b8687e403813004bf2207c4efdc0631e
7
+ data.tar.gz: acc1a12c583c448f52fd1ea4a0a413865b4842425d716297dfa6919c61f658e8efe60188b7956436ea25b19145269ca3faccf10b99d492e38fcf3c9eaf44a69d
@@ -10,6 +10,23 @@ name: Ruby
10
10
  on: push
11
11
 
12
12
  jobs:
13
+ test_31:
14
+ runs-on: ubuntu-latest
15
+ container: ruby:3.1
16
+
17
+ services:
18
+ redis:
19
+ image: redis
20
+
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Install dependencies
24
+ run: gem install bundler && bundle install
25
+ - name: Run tests
26
+ run: bin/rake test
27
+ env:
28
+ REDIS_URL: redis://redis:6379
29
+
13
30
  test_30:
14
31
  runs-on: ubuntu-latest
15
32
  container: ruby:3.0
@@ -27,9 +44,9 @@ jobs:
27
44
  env:
28
45
  REDIS_URL: redis://redis:6379
29
46
 
30
- test_26:
47
+ test_27:
31
48
  runs-on: ubuntu-latest
32
- container: ruby:2.6
49
+ container: ruby:2.7
33
50
 
34
51
  services:
35
52
  redis:
@@ -46,7 +63,7 @@ jobs:
46
63
 
47
64
  typecheck:
48
65
  runs-on: ubuntu-latest
49
- container: ruby:2.6
66
+ container: ruby:2.7
50
67
  steps:
51
68
  - uses: actions/checkout@v2
52
69
  - name: Install dependencies
@@ -56,7 +73,7 @@ jobs:
56
73
 
57
74
  lint:
58
75
  runs-on: ubuntu-latest
59
- container: ruby:2.6
76
+ container: ruby:2.7
60
77
  steps:
61
78
  - uses: actions/checkout@v2
62
79
  - name: Install dependencies
@@ -386,12 +386,12 @@ module Minitest
386
386
  messages_in_retry_set = {}
387
387
  redis.multi do |pipeline|
388
388
  active_messages.each do |key, message|
389
- messages_in_retry_set[key] = pipeline.srem(key("retry_set"), message.attempt_id)
389
+ messages_in_retry_set[key] = pipeline.srem(key("retry_set"), [message.attempt_id])
390
390
  end
391
391
  end
392
392
 
393
393
  # Now, we only select the messages that were on the retry set, and try to claim them.
394
- active_messages.keep_if { |key, _value| messages_in_retry_set.fetch(key).value }
394
+ active_messages.keep_if { |key, _value| messages_in_retry_set.fetch(key).value > 0 }
395
395
  enqueued_runnables = xclaim_messages(active_messages, max_idle_time_ms: 0)
396
396
  reclaimed_failed_tests.merge(enqueued_runnables)
397
397
  enqueued_runnables
@@ -455,8 +455,8 @@ module Minitest
455
455
  results.each do |enqueued_runnable, initial_result|
456
456
  runnable_results << enqueued_runnable.commit_result(initial_result) do |result_to_commit|
457
457
  if ResultType.of(result_to_commit) == ResultType::Requeued
458
- sadd_future = pipeline.sadd(key("retry_set"), enqueued_runnable.attempt_id)
459
- EnqueuedRunnable::Result::Commit.new { sadd_future.value }
458
+ sadd_future = pipeline.sadd(key("retry_set"), [enqueued_runnable.attempt_id])
459
+ EnqueuedRunnable::Result::Commit.new { sadd_future.value > 0 }
460
460
  else
461
461
  xack_future = pipeline.xack(stream_key, group_name, enqueued_runnable.entry_id)
462
462
  EnqueuedRunnable::Result::Commit.new { xack_future.value == 1 }
@@ -3,6 +3,6 @@
3
3
 
4
4
  module Minitest
5
5
  module Distributed
6
- VERSION = "0.2.5"
6
+ VERSION = "0.2.6"
7
7
  end
8
8
  end
@@ -45,6 +45,6 @@ Gem::Specification.new do |spec|
45
45
  spec.require_paths = ["lib"]
46
46
 
47
47
  spec.add_dependency('minitest', '~> 5.12')
48
- spec.add_dependency('redis', '~> 4.2')
48
+ spec.add_dependency('redis', '>= 4.2', '< 6')
49
49
  spec.add_dependency('sorbet-runtime')
50
50
  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.5
4
+ version: 0.2.6
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: 2022-03-21 00:00:00.000000000 Z
11
+ date: 2022-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -28,16 +28,22 @@ dependencies:
28
28
  name: redis
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '4.2'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '6'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
39
42
  - !ruby/object:Gem::Version
40
43
  version: '4.2'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '6'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: sorbet-runtime
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -140,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
146
  - !ruby/object:Gem::Version
141
147
  version: '0'
142
148
  requirements: []
143
- rubygems_version: 3.2.20
149
+ rubygems_version: 3.3.3
144
150
  signing_key:
145
151
  specification_version: 4
146
152
  summary: Distributed test executor plugin for Minitest