Skip to content

Expand unit test coverage for ExecutionResultService #5389

@Ma77Ball

Description

@Ma77Ball

Task Summary

amber/src/main/scala/org/apache/texera/web/service/ExecutionResultService.scala has a spec, but it exercises only convertTuplesToJson, and even there it under-asserts. Tighten the cleanly unit-testable surface:

  • Binary preview formatting: the existing cases assert only byte size and the presence of an ellipsis. Pin the exact preview bits for both branches: the 13-bits-or-fewer branch (a non-empty small field renders its full bit string with no ellipsis) and the leading-10 + ellipsis + trailing-3 format for larger fields.
  • Web result-update ADT JSON contract: add serialization tests for the WebOutputMode / WebResultUpdate types the frontend dispatches on, namely the type discriminator for PaginationMode/SetSnapshotMode/SetDeltaMode and the shapes of WebPaginationUpdate and WebDataUpdate.

Note: the storage/DB/actor-dependent methods (handleResultPagination, convertWebResultUpdate, attachToExecution, onResultUpdate) need integration infrastructure and are out of scope for this unit-test task.

Task Type

  • Testing / QA

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions