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

Fix remote execution tests #18800

Closed
wants to merge 1 commit into from
Closed

Conversation

coeuvre
Copy link
Member

@coeuvre coeuvre commented Jun 28, 2023

by replace mock with spy because we rely on the real method and these methods are final.

Before mockito 5, it uses sublcass mockmaker which cannot mock final method/class. So when we call final methods on these mocked classes, we are calling into the real methods.

Now, it uses inline mockmaker which can mock final method/class. Calling final methods on these mocked classes will return null/default value if we didn't provide the stub.

This change fixes that by using spy.

@coeuvre coeuvre requested a review from a team as a code owner June 28, 2023 13:01
@github-actions github-actions bot added awaiting-review PR is awaiting review from an assigned reviewer team-Remote-Exec Issues and PRs for the Execution (Remote) team labels Jun 28, 2023
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Remote-Exec Issues and PRs for the Execution (Remote) team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant