Skip to content

Improved overflow support: Parameterized torture tests - #29

Merged
DavyLandman merged 12 commits into
improved-overflow-support-mainfrom
improved-overflow-support/parameterized-torture-tests
Apr 3, 2025
Merged

Improved overflow support: Parameterized torture tests#29
DavyLandman merged 12 commits into
improved-overflow-support-mainfrom
improved-overflow-support/parameterized-torture-tests

Conversation

@sungshik

@sungshiksungshik commented Mar 28, 2025

Copy link
Copy Markdown
Contributor

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.

@sungshiksungshik mentioned this pull request Mar 28, 2025
7 tasks
@codecov

codecovBot commented Mar 28, 2025

Copy link
Copy Markdown

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 linesPatch %Lines
...g/swat/watch/impl/overflows/IndexingRescanner.java61.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
@DavyLandman
DavyLandman merged commit 61ebbb8 into improved-overflow-support-mainApr 3, 2025
@sungshik
sungshik deleted the improved-overflow-support/parameterized-torture-tests branch April 7, 2025 06:36
Sign up for freeto 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

@sungshik@DavyLandman