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

Added coverage for TestActivityExecutor private methods #971

Merged

Conversation

3vilhamster
Copy link
Member

@3vilhamster 3vilhamster commented Nov 26, 2024

What changed?
Added unit tests for internal unsupported methods.
This is a huge code smell and shows flows in the Class design, but we need to get the coverage, so refactoring internal pieces could be done later.
Methods are stubbed because they are implemented in workflowInterceptorbase, so the better way would be to extract actual common methods to the base and provide extra methods in the workflow implementation.

But for now I've managed to hack around the internals with reflection and get it covered.

Why?
Improvign code coverage

How did you test it?

Potential risks

Release notes

Documentation Changes

}

// Helper method to print all methods
private void printMethods(Class<?> clazz) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to leave it for now since I'm trying to debug the next steps for WorkflowServiceWrapper. It looks very useful helper :)

@3vilhamster 3vilhamster merged commit 31dd17f into cadence-workflow:master Nov 26, 2024
7 checks passed
@3vilhamster 3vilhamster deleted the unsupported-methods-coverage branch November 26, 2024 13:59
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