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

Ensure all expected paths are logged on test failure #65666

Merged
merged 3 commits into from
Feb 22, 2022

Conversation

adamsitnik
Copy link
Member

The failure provided in #65601 is not very helpful:

Not found: /var/folders/62/ftpn5pv523j8xsdw56s9jnp40000gs/T/Directory_Create_Tests_hsm4w3hg.os4/FileSystemWatcher_Directory_Create_InNestedDirectory_53_bb03705a/dir1
In value:  String[] ["/var/folders/62/ftpn5pv523j8xsdw56s9jnp40000gs/T/D"...]

Let's print all information in the exception message so we can move on with #65601 diagnostics.

@adamsitnik adamsitnik added area-System.IO test-enhancement Improvements of test source code labels Feb 21, 2022
@ghost
Copy link

ghost commented Feb 21, 2022

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

The failure provided in #65601 is not very helpful:

Not found: /var/folders/62/ftpn5pv523j8xsdw56s9jnp40000gs/T/Directory_Create_Tests_hsm4w3hg.os4/FileSystemWatcher_Directory_Create_InNestedDirectory_53_bb03705a/dir1
In value:  String[] ["/var/folders/62/ftpn5pv523j8xsdw56s9jnp40000gs/T/D"...]

Let's print all information in the exception message so we can move on with #65601 diagnostics.

Author: adamsitnik
Assignees: -
Labels:

area-System.IO, test enhancement

Milestone: -

@ghost ghost assigned adamsitnik Feb 21, 2022
}
catch (Exception ex)
{
_output?.WriteLine(ex.ToString());
Copy link
Member

Choose a reason for hiding this comment

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

These were saving the exception information out to the log file. That's not useful anymore?

Copy link
Member Author

Choose a reason for hiding this comment

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

Based on the information provided in #65601 I don't think it's useful:

Not found: /var/folders/62/ftpn5pv523j8xsdw56s9jnp40000gs/T/Directory_Create_Tests_hsm4w3hg.os4/FileSystemWatcher_Directory_Create_InNestedDirectory_53_bb03705a/dir1
In value:  String[] ["/var/folders/62/ftpn5pv523j8xsdw56s9jnp40000gs/T/D"...]

Since the exception was re-thrown anyway I don't see any benefits of keeping this logic. Am I missing something?

Co-authored-by: Stephen Toub <stoub@microsoft.com>
@adamsitnik adamsitnik merged commit 4fd5132 into dotnet:main Feb 22, 2022
@adamsitnik adamsitnik deleted the issue65601logMore branch February 22, 2022 09:40
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO test-enhancement Improvements of test source code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants