-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix TempFile usage while temp dir was deleted in same process #1132
Conversation
Cannot make test running on CI, help is wanted. It seems they're running in parallel, I've tried to add |
{ | ||
dir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), "poifiles")).FullName; | ||
string tempDir = Path.Combine(Path.GetTempPath(), "poifiles"); | ||
dir = Directory.CreateDirectory(tempDir).FullName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CreateDirectory always called so shouldn't actually be dir be assigned tempdirs value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't change much code, but dir
variable doesn't needed at all
|
||
if (!Directory.Exists(dir)) | ||
Directory.CreateDirectory(dir); | ||
|
||
Random rnd = new Random(DateTime.Now.Millisecond); | ||
Thread.Sleep(10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of Thread.Sleep?
@Bykiev There is a conflict. Can you fix it? |
LGTM |
This PR closes #926