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

fix: Clear the queue before adding new elements #439

Merged
merged 1 commit into from
Feb 21, 2024
Merged

Conversation

o-kopysov
Copy link
Collaborator

Pull Request

Description

The queue needs to be cleared before adding new elements.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code cleanup/refactoring
  • Documentation update
  • This change requires a documentation update
  • CI system update
  • Test Coverage update

Testing

Test Configuration:

  • Java: v17
  • LPVS Release: v1.4.1

Checklist:

  • My code follows the style guidelines of this project
  • My code meets the required code coverage for lines (90% and above)
  • My code meets the required code coverage for branches (80% and above)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@o-kopysov o-kopysov added the fix label Feb 21, 2024
@o-kopysov o-kopysov added this to the v1.4.2 milestone Feb 21, 2024
@o-kopysov o-kopysov self-assigned this Feb 21, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f40dc2b) 90.75% compared to head (2d29e03) 90.76%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #439   +/-   ##
=========================================
  Coverage     90.75%   90.76%           
  Complexity      489      489           
=========================================
  Files            47       47           
  Lines          1731     1732    +1     
  Branches        207      207           
=========================================
+ Hits           1571     1572    +1     
  Misses           97       97           
  Partials         63       63           

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

@@ -147,6 +147,7 @@ public BlockingDeque<LPVSQueue> getQueue() {
* @throws InterruptedException If interrupted while processing the queue.
*/
public void checkForQueue() throws InterruptedException {
QUEUE.clear();
Copy link
Collaborator

Choose a reason for hiding this comment

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

As an option, I'd pur warning here if queue is not clear. Cause we should pay attention, some webhooks are not processed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think that warning is needed here. This is the normal operation of the LPVS queue.

Copy link
Collaborator

@m-rudyk m-rudyk left a comment

Choose a reason for hiding this comment

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

Approved.

@o-kopysov o-kopysov merged commit dfb2b4d into main Feb 21, 2024
10 checks passed
@o-kopysov o-kopysov deleted the fix-queue branch February 21, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants