Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.

api: temporary fix test failing on windows due to access denied#1450

Merged
skylenet merged 1 commit intomasterfrom
fix-windows-dirs
Jun 12, 2019
Merged

api: temporary fix test failing on windows due to access denied#1450
skylenet merged 1 commit intomasterfrom
fix-windows-dirs

Conversation

@skylenet
Copy link
Copy Markdown
Contributor

I haven't really figured out the real reason for this failing... Running it locally in my machine would have a ~ 80% failure rate (flaky) with errors like:

mkdir C:\Users\rafael\AppData\Local\Temp\bzz-test578205679\test0: Access is denied.
(string) (len=66) "C:\\Users\\rafael\\AppData\\Local\\Temp\\bzz-test578205679\\test0"
(*os.PathError)(0xc001a570b0)(mkdir C:\Users\rafael\AppData\Local\Temp\bzz-test578205679\test0: Access is denied.)
--- FAIL: TestApiDirUpload0 (0.06s)
    filesystem_test.go:77: unexpected error: mkdir C:\Users\rafael\AppData\Local\Temp\bzz-test578205679\test0: Access is denied.

With this fix it's passing all the time but we're not really testing the directory creation that fs.Download(...) does... which in any way shouldn't be that important because the function seems to be deprecated.

@skylenet skylenet requested a review from nonsense June 11, 2019 12:37
@nonsense
Copy link
Copy Markdown
Contributor

Looks like a race on the temp folder (since it is a global var) while multiple tests are running and trying to access that temp dir, maybe?

@skylenet
Copy link
Copy Markdown
Contributor Author

Looks like a race on the temp folder (since it is a global var) while multiple tests are running and trying to access that temp dir, maybe?

Right, I was thinking that I was targeting only this test while I was testing this locally.
Now I figured out that I was actually targeting more than 1 test. In that case your explanation makes total sense. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants