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

Simplify HasCorrectTimeout #4042

Merged
merged 7 commits into from
Nov 20, 2024

Conversation

SimonCropp
Copy link
Contributor

it was never called with a null value. so move it to a calculated property on the attribute

Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

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

Assigning @nohwnd for review

@nohwnd
Copy link
Member

nohwnd commented Nov 19, 2024

The code looks correct, I've initially added it here, as a replacement for repeated calls to GetAttributes,

https://github.com/microsoft/testfx/pull/2839/files

which reduced the numbers of calls to reflection (I think we queried the attributes 4 or 5 times to figure out the timeout).

And then with further optimizations the code was never called with null as pointed out by this PR.

The code where we query the attributes is using the reflection helper methods, so it all should be correct.

@Evangelink Evangelink assigned SimonCropp and unassigned nohwnd Nov 19, 2024
@Evangelink Evangelink merged commit d53e1e3 into microsoft:main Nov 20, 2024
6 checks passed
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.

4 participants