Skip to content

Add tests to verify e2e analyze caching behavior - #1755

Open
rfbgo wants to merge 2 commits into
Ramble-Project:developfrom
rfbgo:cache_test
Open

Add tests to verify e2e analyze caching behavior#1755
rfbgo wants to merge 2 commits into
Ramble-Project:developfrom
rfbgo:cache_test

Conversation

@rfbgo

@rfbgo rfbgo commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

This augments the existing tests by representing hte e2e workflow

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new test suite in test_workspace_analyze.py to verify workspace analysis features, including FOM filtering and results caching. The review feedback recommends replacing time.sleep calls with explicit timestamp modifications using os.utime to prevent test flakiness on slow CI environments and low-resolution filesystems, which also allows for the removal of the unused time module import.

Comment thread lib/ramble/ramble/test/cmd/test_workspace_analyze.py Outdated
Comment thread lib/ramble/ramble/test/cmd/workspace_analyze.py
@rfbgo

rfbgo commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new test suite test_workspace_analyze.py to verify workspace analysis filtering and results caching behavior, including cache invalidation scenarios. The review feedback suggests improving the robustness of the cache invalidation tests by setting the cache file's timestamp to the past rather than setting the log file's timestamp to a future time, which can be flaky depending on filesystem precision.

Comment thread lib/ramble/ramble/test/cmd/test_workspace_analyze.py Outdated
Comment thread lib/ramble/ramble/test/cmd/test_workspace_analyze.py Outdated
Comment thread lib/ramble/ramble/test/cmd/test_workspace_analyze.py Outdated
@ramble-pr-bot

ramble-pr-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

Ramble Performance Test Metrics

Results produced with commit: 5523be2

Test Name Outcome Duration (s) Most Recent Run (s) Last 5 Avg (s)
test_analyze_large_file passed 2.1459 2.0856 (b311f41) 2.0701
test_large_template_expansion passed 1.2265 1.2188 (b311f41) 1.1978
test_many_experiments passed 25.2388 25.3640 (b311f41) 24.4371
test_many_objects_defaults passed 13.3748 13.6953 (b311f41) 12.7329
test_matrix_filter_perf passed 1.1188 1.1669 (b311f41) 1.1093

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.09%. Comparing base (b311f41) to head (5523be2).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1755      +/-   ##
===========================================
+ Coverage    94.07%   94.09%   +0.01%     
===========================================
  Files          370      371       +1     
  Lines        37424    37517      +93     
===========================================
+ Hits         35207    35301      +94     
+ Misses        2217     2216       -1     

☔ View full report in Codecov by Harness.
📢 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.

@rfbgo
rfbgo marked this pull request as draft September 1, 2026 19:12
@rfbgo
rfbgo marked this pull request as ready for review September 2, 2026 19:34
@rfbgo rfbgo changed the title Add tests to verify assumed caching behavior Add tests to verify e2e analyze caching behavior Sep 2, 2026
Signed-off-by: Bob <robertbird@google.com>
Signed-off-by: Bob <robertbird@google.com>
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.

1 participant