Skip to content

Add DB-backed unit tests for ExecutionsMetadataPersistService and ExecutionStateStore.updateWorkflowState #5210

Closed

Description

@Yicong-Huang

Task Summary

Follow-up to #5208. The pure-logic cluster under org.apache.texera.web is now covered (#5209), but two DB-touching helpers remain uncovered:

  • web/service/ExecutionsMetadataPersistService.scala — insertNewExecution, tryGetExistingExecution, tryUpdateExistingExecution — all three swallow Throwable silently and only log, so a regression that breaks the update path would surface only via missing-data downstream.
  • web/storage/ExecutionStateStore.updateWorkflowState — wraps tryUpdateExistingExecution to also flip the in-memory metadataStore.

Use the existing common/dao MockTexeraDB trait (EmbeddedPostgres + texera_ddl.sql) — same pattern already used by WorkflowExecutionsResourceSpec, WorkflowAccessResourceSpec, etc. Seed a WorkflowExecutions row in beforeEach, exercise the update, assert the row is mutated; pin the silent-failure behavior of tryUpdateExistingExecution on a non-existent eid with a comment so a future fix breaks the spec deliberately.

Task Type

  • Testing / QA

Activity

  1. added a commit that references this issue on May 26, 2026
    69bee15
  2. added a commit that references this issue on Jun 22, 2026
    92e6381
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions