karafka-testing 2.5.2 → 2.5.3

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: 40b46e44a759f27c060eacf7a6d6dccced952d4f2856d1d1e6b3351e6523da32
4
- data.tar.gz: 053c32a504201d0845b907b645931ce6608ce8ee0d2843d524d1cb6a4e94db1d
3
+ metadata.gz: ec0f7907a4fc370e0ee093df0b7759537977de1e54e4873149f8a784f6126e04
4
+ data.tar.gz: 8ca3cb6784c6d2def64c4495d2f9318426c023499c401a01e33e295d27583c7e
5
5
  SHA512:
6
- metadata.gz: 665bd3003da0c61c7104fdfe0452a87d259e2aef68e19541a8c07d3e57c456258a14426d2222c84efd907f222fac90c13b4228659aef143ac518176b27987baa
7
- data.tar.gz: 4be8a6c8ffda91e3eeeb7f5f06fd97bebd26c66a3decf5a307f5f7b41118c19d5fe534303d7c4193a0c7b7f9d28ed37c1438006bbef7189b0dfef9f94e34a3da
6
+ metadata.gz: c61db348f3acb74d3eb3f7a9b807974ae9af1dc00d10e1dcd6f2e3c9dd006bf0f6937ebfd857e9dd51499968cf2e3c075cb9b073226acd0b19449755169c6271
7
+ data.tar.gz: ed1482d93ea2532a5d9123fe05d1ef62157e33d8a8ff9be70fd8434c9fcd30031652e7a0d3ae093398942d183e97a4577bb8a06e7481aa05f39e9073b0b1ccf9
@@ -41,7 +41,7 @@ jobs:
41
41
  run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
42
42
 
43
43
  - name: Set up Ruby
44
- uses: ruby/setup-ruby@bb6434c747fa7022e12fa1cae2a0951fcffcff26 # v1.253.0
44
+ uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
45
45
  with:
46
46
  ruby-version: ${{matrix.ruby}}
47
47
  bundler: 'latest'
@@ -67,7 +67,7 @@ jobs:
67
67
  fetch-depth: 0
68
68
 
69
69
  - name: Set up Ruby
70
- uses: ruby/setup-ruby@bb6434c747fa7022e12fa1cae2a0951fcffcff26 # v1.253.0
70
+ uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
71
71
  with:
72
72
  ruby-version: 3.3
73
73
 
@@ -24,7 +24,7 @@ jobs:
24
24
  fetch-depth: 0
25
25
 
26
26
  - name: Set up Ruby
27
- uses: ruby/setup-ruby@bb6434c747fa7022e12fa1cae2a0951fcffcff26 # v1.253.0
27
+ uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
28
28
  with:
29
29
  bundler-cache: false
30
30
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Karafka Testing Changelog
2
2
 
3
+ ## 2.5.3 (2025-08-12)
4
+ - [Fix] Allow testing consumers with Pro expansions (i.e. Piping).
5
+
3
6
  ## 2.5.2 (2025-08-04)
4
7
  - [Enhancement] Change RSpec hook execution order issue in Karafka testing helpers.
5
8
  - [Change] Remove `funding_uri` from the gemspec to minimize double-funding info.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka-testing (2.5.2)
4
+ karafka-testing (2.5.3)
5
5
  karafka (>= 2.5.0.beta1, < 2.6.0)
6
6
  waterdrop (>= 2.8.0)
7
7
 
@@ -190,6 +190,7 @@ module Karafka
190
190
  coordinators = Karafka::Processing::CoordinatorsBuffer.new(
191
191
  Karafka::Routing::Topics.new([topic])
192
192
  )
193
+ processing_cfg = Karafka::App.config.internal.processing
193
194
  @consumer = topic.consumer.new
194
195
  @consumer.producer = Karafka::App.producer
195
196
  # Inject appropriate strategy so needed options and components are available
@@ -200,6 +201,8 @@ module Karafka
200
201
  @consumer.coordinator.seek_offset = 0
201
202
  # Indicate usage as for tests no direct enqueuing happens
202
203
  @consumer.instance_variable_set('@used', true)
204
+ expansions = processing_cfg.expansions_selector.find(topic)
205
+ expansions.each { |expansion| @consumer.singleton_class.include(expansion) }
203
206
  @_karafka_consumer_mappings[topic.name] = @consumer
204
207
  @consumer
205
208
  end
@@ -201,16 +201,19 @@ module Karafka
201
201
  Karafka::Routing::Topics.new([topic])
202
202
  )
203
203
 
204
+ processing_cfg = Karafka::App.config.internal.processing
204
205
  consumer = topic.consumer.new
205
206
  consumer.producer = Karafka::App.producer
206
207
  # Inject appropriate strategy so needed options and components are available
207
- strategy = Karafka::App.config.internal.processing.strategy_selector.find(topic)
208
+ strategy = processing_cfg.strategy_selector.find(topic)
208
209
  consumer.singleton_class.include(strategy)
209
210
  consumer.client = _karafka_consumer_client
210
211
  consumer.coordinator = coordinators.find_or_create(topic.name, 0)
211
212
  consumer.coordinator.seek_offset = 0
212
213
  # Indicate usage as for tests no direct enqueuing happens
213
214
  consumer.instance_variable_set('@used', true)
215
+ expansions = processing_cfg.expansions_selector.find(topic)
216
+ expansions.each { |expansion| consumer.singleton_class.include(expansion) }
214
217
 
215
218
  @_karafka_consumer_mappings[topic.name] = consumer
216
219
  consumer
@@ -4,6 +4,6 @@
4
4
  module Karafka
5
5
  module Testing
6
6
  # Current version of gem. It should match Karafka framework version
7
- VERSION = '2.5.2'
7
+ VERSION = '2.5.3'
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka-testing
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 2.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld