fake consumer unsubscribes#388
Conversation
|
@h1alexbel thank you for your Pull Request. I'll assign someone to review it soon. If this PR solves a |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #388 +/- ##
============================================
+ Coverage 97.79% 97.86% +0.06%
- Complexity 154 157 +3
============================================
Files 72 73 +1
Lines 408 421 +13
Branches 0 1 +1
============================================
+ Hits 399 412 +13
Misses 9 9
☔ View full report in Codecov by Sentry. |
|
@l3r8yJ please review this Pull Request. Deadline (when it should be merged or closed) is You should check if the requirements have been implemented (partially or in full), if there are unit tests covering the changes and if the CI build passes. Feel free to reject the PR or ask for changes if it's too big or not clear enough. Estimation here is |
|
|
||
| @Test | ||
| void unsubscribes() throws Exception { | ||
| final String topic = "unsubscribe.test"; | ||
| final UUID uuid = UUID.randomUUID(); | ||
| final Consumer<String, String> consumer = | ||
| new FkConsumer<>( | ||
| uuid, | ||
| this.broker | ||
| ); |
There was a problem hiding this comment.
| @Test | |
| void unsubscribes() throws Exception { | |
| final String topic = "unsubscribe.test"; | |
| final UUID uuid = UUID.randomUUID(); | |
| final Consumer<String, String> consumer = | |
| new FkConsumer<>( | |
| uuid, | |
| this.broker | |
| ); | |
| @Test | |
| @ExtendWith({ | |
| UUIDExtension.class, | |
| ConsumerExtension.class | |
| }) | |
| void unsubscribes(final UUID uuid, final Consumer<String, String> consumer) throws Exception { | |
| final String topic = "unsubscribe.test"; |
There was a problem hiding this comment.
@l3r8yJ Unfortunately it is not possible to mix the params using extensions
if we need a UUIDExtension and ConsumerExtension:
when creating a consumer, we need a UUID from the extension, that generates it
but I can't take this generated parameter
Then, if we decide to make only one ConsumerExtension, in following assertion we don't have parameter uuid:
MatcherAssert.assertThat(
"Consumer ID in subscription is not present",
this.broker.data(
"broker/subs/sub[consumer = '%s']/consumer/text()"
.formatted(
uuid
)
)
.isEmpty(),
Matchers.equalTo(true)
);maybe I missing something, especially in getting parameters from another extension
WDYT?
There was a problem hiding this comment.
@l3r8yJ also, this test case (unsubscribes) requires testing consumers with the same broker
l3r8yJ
left a comment
There was a problem hiding this comment.
@h1alexbel and yes, you're right, we can't do it with those parameters
|
@rultor merge |
@h1alexbel OK, I'll try to merge now. You can check the progress of the merge here |
@h1alexbel Done! FYI, the full log is here (took me 3min) |
|
@l3r8yJ thank you for resolving this ticket. I've just added it to your active invoice. You can always check all your invoices and more on the Contributor Dashboard. |
@l3r8yJ take a look, please
closes #371 #297
PR-Codex overview
This PR implements the
unsubscribe()method for theFkConsumerclass in theio.github.eocqrs.kafka.fakepackage.Detailed summary
unsubscribe()method toFkConsumerclass.UnsubscribeDirsclass to handle theunsubscribe()method.unsubscribe()method andUnsubscribeDirsclass.