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
Don't enforce [Timeout] when debugger is attached #3054
Comments
I think you're right, and this was just missed during code review. We'd welcome a Pull Request to fix it, if you'd be interested? |
Ok. I will try to do it. I never changes something in NUnit, but the code looks quite readable :-) |
Great - thanks! Check out https://github.com/nunit/nunit/blob/master/BUILDING.md for a few specialist details, if you have any issues building/running the tests, and let us know if we can help at all. 🙂 |
Also, given we've already had one regression, it would be really cool if we could unit test this. Maybe we could put a wrapper around the Debugger class or something, to make that possible. 🙂 |
Hey guys, Currently my codebase has it's own implementation of TimeoutAttribute which does this. |
Thanks @thepinkmile! The change to MaxTimeAttribute sounds good to me, would appreciate a PR for that. @bormm How are you getting on with this issue? 🙂 Do shout if we can help at all! |
Not sure if this is the correct way to do it, but based on referenced items in initial post. |
@thepinkmile @ChrisMaddock Unfortunately I got no resources to work on this issue in my working time, so I am currently not able to do something for this issue. Especially for the DI + testing part, which would take the most time. I am also not sure how useful the testing could be, because you can't test if the encapsulated debugger function is working as expected. But long story short: If @thepinkmile would just adapt his change and pick this issue, it would be a good thing. |
I was thinking it might be possible to pass in an In this case, perhaps we're just better to get a fix in however. @thepinkmile - if you'd like to PR your fix to TimeoutCommand, that would be very welcome! The MaxTime one, the team might want to discuss a little more, but I think it sounds sensible to me! @bormm - thanks regardless for your help in identifying and logging the issue. 😄 |
I currently have it all as a single commit. Will break it down tonight and add as 2 separate commits with 2 different PRs. Will probably have a look at doing some kind of tests for it over weekend if I get time. |
Sounds great, thanks! |
Not had a chance to fix this up yet. Will likely be over the weekend I do it all. |
Which version of the NUnit framework are you using? This was a bug which was recently fixed in 3.11, see #2786. Not sure whether the fix will be relevant to your custom attribute or not, but if you have a look at the related PR, it should hopefully point you in the right direction!
No rush - and thanks! 😄 |
Apparently we are still using 3.9 (will update this soon I hope). I am currently working on a new fix for this that includes the IDebugger interface to allow for testing. Also to allow for disabling of this check if required (apparently dotcover sets Debugger.IsAttached to true, so probably not a good thing). Wondering if it is possible to have a command-line flag to enable and disable this check. So running the test it just does the right thing, but if using dotcover then it still bombs out if needed. |
Thanks for taking on the IDebugger idea - sounds promising! dotcover's an interesting situation. I'm not sure how this works...but you might want to test it out...what happens if you use the FYI - I've just unassigned this issue from [@]bormm - unfortunately GitHub won't let me assign it directly to you as a first-time contributor! I've assigned it to myself instead, just so it's clear to anyone else coming along that someones working on it - look forward to your pull request! 😄 |
Hello, since the topic has not been active for several months, I took the liberty in analysing the problem and would like to ask you for further guidance.
Please advise on the way forward with this, I would be happy to implement the fix. |
Hello, |
Greetings NUnit team!
I was just debugging within a nunit test that has a Timeout attribute. Unfortunately it was aborted by timeout while debugging. I have found this existing issue #1479 that was already fixed by #1785 in 2016.
For me it seems the fix got lost with commit 1a164db .
So is there something wrong with my little research result or was the feature lost without intention?
The text was updated successfully, but these errors were encountered: