Add unit tests for EnhancementQueueWorker and EnhancementQueueScheduler #139

Closed
opened 2026-08-14 06:06:05 +00:00 by Mark · 0 comments
Owner

The enhancement queue shipped in #133 (commit 39af1b3) has no unit tests. The test tree (app/src/test) has SearchRepositoryTest.kt (added with #134), InstantConverterTest, FloatArrayConverterTest, ModelCatalogTest, KeywordTopicDetectorTest, SessionTitleGeneratorTest, DiarizationModelCatalogTest — nothing for EnhancementQueueWorker, EnhancementQueueScheduler, or EnhancementJobRepository.

The worker's dispatch/attempt-counting logic is testable with a fake DAO/repository. Add coverage for:

  • doWork() with no pending jobs -> success no-op
  • dispatch per job type (diarization / topic extraction / summarization / title generation)
  • attempt-count increment and FAILED after MAX_ATTEMPTS
  • scheduler schedule() enqueues a unique one-time work with NetworkType.CONNECTED

Filed from kanban card t_a946c33c (post-deploy probe of Mark/transcriber#133).

The enhancement queue shipped in #133 (commit 39af1b3) has no unit tests. The test tree (app/src/test) has SearchRepositoryTest.kt (added with #134), InstantConverterTest, FloatArrayConverterTest, ModelCatalogTest, KeywordTopicDetectorTest, SessionTitleGeneratorTest, DiarizationModelCatalogTest — nothing for EnhancementQueueWorker, EnhancementQueueScheduler, or EnhancementJobRepository. The worker's dispatch/attempt-counting logic is testable with a fake DAO/repository. Add coverage for: - doWork() with no pending jobs -> success no-op - dispatch per job type (diarization / topic extraction / summarization / title generation) - attempt-count increment and FAILED after MAX_ATTEMPTS - scheduler schedule() enqueues a unique one-time work with NetworkType.CONNECTED Filed from kanban card t_a946c33c (post-deploy probe of Mark/transcriber#133).
Mark 2026-08-14 06:06:05 +00:00
Sign in to join this conversation.
No description provided.