Skip to content

Conversation

@sungshik
Copy link
Contributor

@sungshik sungshik commented Mar 28, 2025

Primary goal of this PR

This PR parameterizes the torture tests with auto-handlers for OVERFLOW events, so we now automatically run all torture tests with MemorylessRescanner (i.e., OnOverflow.ALL) and IndexingRescanner (i.e., OnOverflow.DIRTY).

As JUnit doesn't seem to have easy support for combining @ParameterizedTest and @RepeatedTest, but we do need both, three approaches were considered:

This PR implements the third approach because: (a) it's conceptually easy; (b) it yields the least amount of extra code; (c) as a result, it seems to strike the best balance for now between effort vs. number of torture tests that need it (only one). If, at some point in the future, we happen to have many more (torture) tests that need it, then maybe we should revisit and invest some effort to use one of the other approaches.

Other changes

This PR also fixes two issues in IndexingRescanner that were revealed by the parameterized tests, namely: (a) a small fix that makes sure a file really doesn't exist when a DELETED event is generated; (b) a larger fix that adds more hierarchical structure to the index map---two levels instead of one level---to address performance issues.

@sungshik sungshik mentioned this pull request Mar 28, 2025
7 tasks
@codecov
Copy link

codecov bot commented Mar 28, 2025

Codecov Report

Attention: Patch coverage is 61.90476% with 16 lines in your changes missing coverage. Please review.

Project coverage is 80.4%. Comparing base (fd68764) to head (23506ae).
Report is 13 commits behind head on improved-overflow-support-main.

Files with missing lines Patch % Lines
...g/swat/watch/impl/overflows/IndexingRescanner.java 61.9% 10 Missing and 6 partials ⚠️
Additional details and impacted files
@@                        Coverage Diff                         @@
##             improved-overflow-support-main     #29     +/-   ##
==================================================================
- Coverage                              81.5%   80.4%   -1.2%     
  Complexity                              130     130             
==================================================================
  Files                                    16      16             
  Lines                                   532     567     +35     
  Branches                                 54      64     +10     
==================================================================
+ Hits                                    434     456     +22     
- Misses                                   62      70      +8     
- Partials                                 36      41      +5     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sungshik sungshik marked this pull request as ready for review April 1, 2025 10:00
@sungshik sungshik requested a review from DavyLandman April 1, 2025 10:00
@DavyLandman DavyLandman merged commit 61ebbb8 into improved-overflow-support-main Apr 3, 2025
23 of 24 checks passed
@sungshik sungshik deleted the improved-overflow-support/parameterized-torture-tests branch April 7, 2025 06:36
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.

2 participants