Skip to content

Conversation

@seadowg
Copy link
Member

@seadowg seadowg commented Sep 22, 2025

Follow up to #6900

This adds tests as well as fixing the bugs fixed in #6900 within the new structure.

Why is this the best possible solution? Were any other approaches considered?

Now, foreground service work manager jobs are run using real WorkManager infrastructure in tests. Deferred work still just runs on a standard background thread, but that seems like a fair trade-off for being able to control when they run still.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

There's been some changes made to how background jobs work in general, so I think testing repeated jobs (like match exactly) as well as manually syncs (again with match exactly) is a good idea.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • added any new strings with date formatting to DateFormatsTest
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@seadowg seadowg changed the base branch from master to v2025.3.x September 22, 2025 17:01
@seadowg seadowg changed the base branch from v2025.3.x to master September 22, 2025 17:02
@seadowg seadowg marked this pull request as ready for review October 8, 2025 10:34
@seadowg seadowg force-pushed the foreground-service-test branch from 2f9bbcf to 37f6db7 Compare October 8, 2025 10:38
@seadowg seadowg marked this pull request as draft October 8, 2025 10:52
@seadowg seadowg requested a review from grzesiek2010 October 8, 2025 11:49
@seadowg seadowg marked this pull request as ready for review October 8, 2025 11:50
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