Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests for thrift mappers #5542

Merged

Conversation

taylanisikdemir
Copy link
Contributor

What changed?
There was a thrift-tests folder with a few test cases. This folder was created as a workaround to avoid cyclic imports. Got rid of cyclic import by hardcoding a few things in testdata and moved the tests to correct package common/types/mapper/thrift.
Also added bunch of new tests cases with help of copilot.

Some call outs:

  1. WorkflowExecutionStartedEventAttributes in thrift package doesn't have ParentWorkflowDomainID field. Had to apply a workaround in test payload comparisons to ignore this field.
  2. ContinueAsNewWorkflowExecutionDecisionAttributes.JitterStartSeconds was not mapped. Updated corresponding from/to mapper functions to populate/use it.

Why?
Improve coverage

How did you test it?
unit tests.

@taylanisikdemir taylanisikdemir merged commit 599a01d into uber:master Dec 27, 2023
16 checks passed
@taylanisikdemir taylanisikdemir deleted the taylan/thrift_mapper_tests branch December 27, 2023 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants