Skip to content

Improve Worker Package Test Coverage and Fix Pre-existing Tests - #6

Open
moijes12 wants to merge 1 commit into
masterfrom
improve-workers-test-coverage-7636571637100520221
Open

Improve Worker Package Test Coverage and Fix Pre-existing Tests#6
moijes12 wants to merge 1 commit into
masterfrom
improve-workers-test-coverage-7636571637100520221

Conversation

@moijes12

Copy link
Copy Markdown
Owner

This submission improves test coverage for the treeherder/workers/ package to 100% and fixes pre-existing issues.

Key Changes:

  • Fixed and unskipped the long-broken test_retry_missing_revision_succeeds in tests/test_worker/test_pulse_tasks.py.
  • Updated tests/test_worker/test_stats.py to filter caplog logs by logger name, preventing brittle failures due to Google Cloud Logging diagnostic output.
  • Covered get_stats_client() in treeherder/workers/stats.py to achieve 100% coverage.
  • Wrote extensive unit tests in tests/test_worker/test_task.py to thoroughly verify success paths, various non-retryable exceptions, and retryable exceptions with expected New Relic notice_error triggers.

PR created automatically by Jules for task 7636571637100520221 started by @moijes12

- Unskip and fix `test_retry_missing_revision_succeeds` in `test_pulse_tasks.py`
- Filter `caplog.record_tuples` in `test_stats.py` to prevent brittle failures from external logging
- Add comprehensive testing to `test_task.py` for retryable tasks, standard exceptions, and New Relic integration
- Achieved 100% test coverage for the `treeherder/workers` package
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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