Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Refactor transitions functions for testing #94

Open
aclavio opened this issue Jul 1, 2020 · 0 comments
Open

Refactor transitions functions for testing #94

aclavio opened this issue Jul 1, 2020 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@aclavio
Copy link
Contributor

aclavio commented Jul 1, 2020

A "save" parameter was added to enable unit testing of the various transition functions:

  • executeStateByJobDoc
  • startProcessingFlowByJobDoc
  • retryJobAtStateByJobDoc
  • resumeWaitingJobByJobDoc
  • transition

These functions should be refactored to remove all document updates, and only mutate and return the job object in memory. Corresponding functions should be added which calls these functions, and save the result (resume and retry already partially implement this). The "save" parameter can then be removed.

This will allow the unit tests to simply call the mutator functions without the "save" parameter, and the application code to call the function which commits mutated job document.

@aclavio aclavio added this to the 1.1.0 milestone Jul 1, 2020
@aclavio aclavio added the enhancement New feature or request label Jul 1, 2020
@aclavio aclavio modified the milestones: Backlog, 1.2.0 May 10, 2021
@aclavio aclavio modified the milestones: 1.2.0, 1.3.0 Jun 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant