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

Improve display name when DataRow contains arrays #3053

Merged
merged 8 commits into from
Jun 10, 2024

Conversation

MichelZ
Copy link
Contributor

@MichelZ MichelZ commented May 31, 2024

Fixes #1333

Improves the display name for DataRow tests for Arrays from:
MyMethod (System.String[])
to
MyMethod ([a,b,c])

@MichelZ MichelZ marked this pull request as draft May 31, 2024 08:26
@MichelZ MichelZ marked this pull request as ready for review May 31, 2024 10:35
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.

I wasn't able to review but just wanted to point out that this change would be a breaking change for people still using the display name for the tests id generation. Because it's obsolete it might not be as important but wanted to point it out so we don't merge too fast without thinking about consequences.

@MichelZ
Copy link
Contributor Author

MichelZ commented Jun 1, 2024

I wasn't able to review but just wanted to point out that this change would be a breaking change for people still using the display name for the tests id generation. Because it's obsolete it might not be as important but wanted to point it out so we don't merge too fast without thinking about consequences.

True. Do you think it would be helpful if the feature was an opt-in feature? I.e. a Flag on the Attribute for the Array Display Name?

@nohwnd
Copy link
Member

nohwnd commented Jun 3, 2024

@Evangelink Good to know I was thinking the same, but there was no breaking label, or future milestone. Can this be linked to id generation strategy? We have that as assembly level attribute (but imho also as a runsettings option). And if user is not using Legacy then we could generate the new display name?

https://grep.app/search?q=idgenerationstrategy&filter[repo.pattern][0]=testfx

@nohwnd
Copy link
Member

nohwnd commented Jun 3, 2024

The build is crashing on StackOverflow, I've added steps to install procdump so vstest can collect dumps. and pushed into your main Michel, for your next PR I would recommend creating a separate branch that is not main, so we don't block you if we take some time to merge this PR.

@nohwnd nohwnd mentioned this pull request Jun 3, 2024
@nohwnd
Copy link
Member

nohwnd commented Jun 3, 2024

Correction I cannot push to your main, because that is not a feature branch. So I created this PR, once that is merged you should be able to update and see why is the code is failing with Stack Overflow. #3059

@MichelZ
Copy link
Contributor Author

MichelZ commented Jun 3, 2024

Thanks, that should not be necessary just for me though, I fixed the StackOverflow issue now

@nohwnd
Copy link
Member

nohwnd commented Jun 3, 2024

We will merge this next week at earliest, once evangelink and other folks are back from vacation and we can discuss how to avoid the breaking change.

If you are okay with this PR hanging here and blocking your main branch then no action is needed. If you want to dig into more stuff, I would suggest checking out another branch, and making a new PR from it.

@Evangelink
Copy link
Member

We will expose a protected property on the DataRowAttribute that let subclasses know what's the selected TestIdGenerationStrategy and we will use this property to condition the change and avoid any breaking change.

@MichelZ I will push the change to your PR.

@Evangelink Evangelink closed this Jun 10, 2024
@Evangelink Evangelink reopened this Jun 10, 2024
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.

Thank you for your contribution @MichelZ :shipit:

@Evangelink Evangelink disabled auto-merge June 10, 2024 11:54
@Evangelink
Copy link
Member

Flaky test, force merging.

@Evangelink Evangelink merged commit 959d5b0 into microsoft:main Jun 10, 2024
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve display name when DataRow contains arrays
3 participants