Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

New package for retry and tempDir #49

Open
DavidVorick opened this issue Nov 17, 2017 · 2 comments
Open

New package for retry and tempDir #49

DavidVorick opened this issue Nov 17, 2017 · 2 comments
Assignees

Comments

@DavidVorick
Copy link
Member

We use these two functions all over the place in our codebase. Is this something that we would want to split into a separate package instead of re-implementing in every project?

I was thinking we could have like a testhelp package.

@huetsch
Copy link

huetsch commented Nov 26, 2017

There are 2 redundant functions in the Sia codebase, retry() in api/server_helpers_test.go and Retry() in build/testing.go. Sometimes both of them are even called in the same function. build.Retry also very recently snuck into some into some non-test code as well (https://github.com/NebulousLabs/Sia/blob/master/modules/renter/contractor/journal.go#L115). If journal's use of it is correct, testhelp probably isn't a good package name for it.

@DavidVorick
Copy link
Member Author

Maybe retry should just be it's own package then. I could see some non-testing reasons to use it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants