Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Fixing "too many open files" error in tests #365

Merged
merged 3 commits into from Jul 27, 2020
Merged

Fixing "too many open files" error in tests #365

merged 3 commits into from Jul 27, 2020

Conversation

kushti
Copy link
Contributor

@kushti kushti commented Jul 26, 2020

Currently "too many open files" error appears in tests. The error is rooting in how recursive deletion is implemented in scorex.testkit.utils.FileUtils.remove(). This PR fixes the problematic recursive files deletion.

The fix is made by @knizhnik and extracted from the #362 .

@@ -35,21 +33,22 @@ trait FileUtils {
createTempDirForPrefix(prefix)
}


@SuppressWarnings(Array("org.wartremover.warts.Recursion"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add ScalaDoc, in particular describing the rationale behind not deleting some of the files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed preserving hidden files (it was copy-pasted from the internets likely), also, made the deleteRecursive method internal to remove()

@coveralls
Copy link

coveralls commented Jul 27, 2020

Coverage Status

Coverage remained the same at 46.984% when pulling 97c0a07 on toomany into 8ddf4af on master.

@kushti kushti merged commit 07d30ca into master Jul 27, 2020
@kushti kushti deleted the toomany branch July 27, 2020 11:56
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.

None yet

4 participants