Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StringBuilderPool - Added unit test of MaxCapacity checks #3353

Merged
merged 1 commit into from
May 3, 2019

Conversation

snakefoot
Copy link
Contributor

@snakefoot snakefoot commented May 2, 2019

Regression test for #3345

Figured out it was much easier to test the StringBuilderPool-directly, instead of trying to exercise the entire NLog-engine with many threads.

@304NotModified
Copy link
Member

cool!

Can we maybe split this into 3 separate unit tests? We could use the ctor as test init for the large fields

@codecov-io
Copy link

Codecov Report

Merging #3353 into dev will increase coverage by <1%.
The diff coverage is n/a.

@@          Coverage Diff           @@
##             dev   #3353    +/-   ##
======================================
+ Coverage     80%     80%   +<1%     
======================================
  Files        356     356            
  Lines      28205   28205            
  Branches    3750    3750            
======================================
+ Hits       22559   22616    +57     
+ Misses      4540    4506    -34     
+ Partials    1106    1083    -23

@snakefoot
Copy link
Contributor Author

Can we maybe split this into 3 separate unit tests?

Do what you like. But the different steps in the test are actually slowly moving the StringBuilderPool into the broken-state (that was possible before the bugfix)

@304NotModified
Copy link
Member

the order of the RecursiveAcquirePoolItems calls is important, isn't?

@snakefoot
Copy link
Contributor Author

snakefoot commented May 3, 2019 via email

@304NotModified
Copy link
Member

So we can't move to separate tests then?

@snakefoot
Copy link
Contributor Author

snakefoot commented May 3, 2019 via email

@304NotModified 304NotModified merged commit 4d0fec6 into NLog:dev May 3, 2019
@304NotModified 304NotModified added this to the 5.0 (new) milestone May 3, 2019
@snakefoot snakefoot deleted the StringBuilderPoolNoReset branch April 4, 2020 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants