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 +4 -4
- data/.github/workflows/ci.yml +2 -2
- data/.github/workflows/push.yml +1 -1
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/karafka/testing/minitest/helpers.rb +3 -0
- data/lib/karafka/testing/rspec/helpers.rb +4 -1
- data/lib/karafka/testing/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec0f7907a4fc370e0ee093df0b7759537977de1e54e4873149f8a784f6126e04
|
4
|
+
data.tar.gz: 8ca3cb6784c6d2def64c4495d2f9318426c023499c401a01e33e295d27583c7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c61db348f3acb74d3eb3f7a9b807974ae9af1dc00d10e1dcd6f2e3c9dd006bf0f6937ebfd857e9dd51499968cf2e3c075cb9b073226acd0b19449755169c6271
|
7
|
+
data.tar.gz: ed1482d93ea2532a5d9123fe05d1ef62157e33d8a8ff9be70fd8434c9fcd30031652e7a0d3ae093398942d183e97a4577bb8a06e7481aa05f39e9073b0b1ccf9
|
data/.github/workflows/ci.yml
CHANGED
@@ -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@
|
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@
|
70
|
+
uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
|
71
71
|
with:
|
72
72
|
ruby-version: 3.3
|
73
73
|
|
data/.github/workflows/push.yml
CHANGED
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
@@ -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 =
|
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
|