Skip to content

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

@Yicong-Huang

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.scalainsertNewExecution, 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions