-
Notifications
You must be signed in to change notification settings - Fork 31
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
Redirected progress output appears multiplicated by the number a test has been ran #1044
Comments
I assume you mean this project... TextOutputIssue with ProgressTraceListener.zip and this output... Please describe the specific way you are running the test, i.e., clicking some button, right-clicking in the tree, running the whole assembly or a part, etc. It's possible that it makes no difference, but still useful as a starting point. |
Clarifying To Reproduce:
For each [Run], the redirected |
@maettu-this Are you sure you have given me the correct project for this issue? I'm not seeing the replication at all. |
Hmm... I can reproduce each time. If you like we can open a Teamviewer or whatever session. You can download the latest file at https://sourceforge.net/projects/y-a-terminal/ and open [!-ReadMe.txt] to find an email address that will reach me. (For not having to disclose any email address here.) And let me state the versions in more detail:
Microsoft Visual Studio Community 2022 (64-bit) Version 17.8.7
Dropping the |
What happens without the trace listener? Do you get replication then? |
Note that I am off for a week now. I'll respond as soon as back. In case you still don't find anything, you could describe how I can try debugging the issue at my end. Just give me some hints on what to build and how to debug and where in the code to look at. |
Quick comments while I'm still waking up...
I'll get back to you. |
Each time you run the tests you create a new trace listener. So on first run there is one listener, second run two, etc. Removing the listener in OneTimeTearDown made it work for me. You need to be aware that OneTimeSetUp and OneTimeTearDown execute once per test run. Closing as Not a Bug. |
Great, that's it! For some reason, the VS Test Adapter or the VS Test Explorer behaves differently on this, running the test multiple times there does not result in a multiplication:
Instead of adding and removing each time, this also prevents the multiplication:
Thanks for finding the root cause! |
This issue is extracted from #1043 as it an additional finding.
Describe the bug
See 3. "...caching/flushing issue..." at #1043 (comment).
To Reproduce
Expected behavior
Redirected progress output shall be output once only for each test run.
Screenshots
See 3. "...caching/flushing issue..." at #1043 (comment).
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: