Skip to content

Retry attribute should not derive from PropertyAttribute #3144

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

Closed
rprouse opened this issue Jan 25, 2019 · 2 comments
Closed

Retry attribute should not derive from PropertyAttribute #3144

rprouse opened this issue Jan 25, 2019 · 2 comments

Comments

@rprouse
Copy link
Member

rprouse commented Jan 25, 2019

The RetryAttribute derives from PropertyAttribute and passes the retry count to the base as the property to set which is never used. This sets unneeded properties on the test and will end up creating odd categories in test runners like Visual Studio.

        public RetryAttribute(int tryCount) : base(tryCount)
        {
            _tryCount = tryCount;
        }

This attribute should probably just derive from NUnitAttribute

@CharliePoole
Copy link
Member

I think it's that way only because V2 had the property, which it actually used.

@JerryBLi
Copy link

I just submitted a pull request to fix this issue.

@mikkelbu mikkelbu added this to the 3.12 milestone Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants