Skip to content

Conversation

ricsiLT
Copy link
Contributor

@ricsiLT ricsiLT commented May 26, 2022

Add exception objects to events so you can inspect them in event listeners

@ricsiLT
Copy link
Contributor Author

ricsiLT commented May 26, 2022

Scratch that, it doesn't do what I want it to do :D I'll come back to this later. I still want to have the exception itself in event payload...

@ricsiLT
Copy link
Contributor Author

ricsiLT commented May 27, 2022

Ok, should be good now. If necessary, I can add tests for both .Count = 0 and .Count != 0 cases. The idea behind this PR is in reliable producer/consumer, if there's a socket exception we can't see the data that was added when exception was caught. Sucks, but I couldn't find a way around that limitation :(

@codecov-commenter
Copy link

codecov-commenter commented May 27, 2022

Codecov Report

Merging #128 (59acdcf) into main (e4959cf) will increase coverage by 0.18%.
The diff coverage is 92.30%.

@@            Coverage Diff             @@
##             main     #128      +/-   ##
==========================================
+ Coverage   91.61%   91.80%   +0.18%     
==========================================
  Files          75       75              
  Lines        5668     5744      +76     
  Branches      349      354       +5     
==========================================
+ Hits         5193     5273      +80     
+ Misses        388      386       -2     
+ Partials       87       85       -2     
Impacted Files Coverage Δ
...abbitMQ.Stream.Client/Reliable/ReliableConsumer.cs 87.17% <0.00%> (ø)
...abbitMQ.Stream.Client/Reliable/ReliableProducer.cs 86.89% <0.00%> (ø)
RabbitMQ.Stream.Client/LogEventSource.cs 95.08% <95.45%> (+2.05%) ⬆️
Tests/EventSourceTests.cs 98.95% <98.38%> (-1.05%) ⬇️
RabbitMQ.Stream.Client/LogEventListener.cs 100.00% <100.00%> (+21.42%) ⬆️
RabbitMQ.Stream.Client/MetaData.cs 91.58% <0.00%> (+0.93%) ⬆️
RabbitMQ.Stream.Client/Subscribe.cs 65.21% <0.00%> (+1.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e4959cf...59acdcf. Read the comment docs.

@lukebakken lukebakken added this to the 1.0.0-rc.2 milestone May 28, 2022
@lukebakken lukebakken self-assigned this May 28, 2022
@lukebakken lukebakken modified the milestones: 1.0.0-rc.2, 1.0.0-rc.4 May 28, 2022
Write log events to stdout/stderr as appropriate. Add code to view logged messages when running tests
@lukebakken
Copy link
Contributor

@ricsiLT thanks for your contribution. I made some changes to ensure that inner exceptions are taken into account, as well as enabling logging to console when the tests are run so the output can be verified. Let me know what you think.

@ricsiLT
Copy link
Contributor Author

ricsiLT commented May 30, 2022

LGTM :D

@lukebakken
Copy link
Contributor

Thank you @ricsiLT !

@lukebakken lukebakken merged commit 292d519 into rabbitmq:main May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants