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

Avoid inconsistent coverage of drain callback in streaming code #6016

Merged
merged 4 commits into from
Oct 17, 2024

Conversation

Martchus
Copy link
Contributor

  • Ensure code section mentioned in https://progress.opensuse.org/issues/167803 is consistently covered
  • See further commit messages for other improvements; this PR will generally improve the coverage of streaming-related code

* Remove useless code and comments
* Remove redundant `use …;`
* Use normal naming conventions for variables
* See https://progress.opensuse.org/issues/167803
@Martchus Martchus force-pushed the controller-running-test branch from a56bea9 to c12ea6e Compare October 17, 2024 13:56
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.96%. Comparing base (957f9c2) to head (c12ea6e).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6016      +/-   ##
==========================================
+ Coverage   98.93%   98.96%   +0.03%     
==========================================
  Files         396      396              
  Lines       39341    39345       +4     
==========================================
+ Hits        38923    38939      +16     
+ Misses        418      406      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@kalikiana kalikiana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the finish/tick bits are what makes it reliable. Good catch!

@mergify mergify bot merged commit 9ff0bc1 into os-autoinst:master Oct 17, 2024
46 checks passed
@Martchus Martchus deleted the controller-running-test branch October 17, 2024 14:28
@Martchus
Copy link
Contributor Author

Martchus commented Oct 17, 2024

I guess the finish/tick bits are what makes it reliable.

No, the code section mentioned in the ticket was simply not covered at all by this unit test. It was only covered by the fullstack test and that was not reliable. Finishing the controller is for extending coverage even a little bit further (see codecov report).

The one-tick bits are so that all events are handled before leaving the subtest. Otherwise they'd be handled in the next subtest where certain objects have already been destroyed leading to Perl warnings. This would have been a problem after the unit test is now executing more of the event processing code.

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.

None yet

3 participants