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

feat: add retry / delay on teststep #3

Merged
merged 2 commits into from
Feb 18, 2017
Merged

feat: add retry / delay on teststep #3

merged 2 commits into from
Feb 18, 2017

Conversation

yesnault
Copy link
Member

Signed-off-by: Yvonnick Esnault yvonnick.esnault@corp.ovh.com

Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
process.go Outdated
var errors []Failure
var failures []Failure

for retry := 0; retry <= e.retry; retry++ {
Copy link
Member

Choose a reason for hiding this comment

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

for retry := 0; retry < e.retry && !isOK ; retry++ {

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

process.go Outdated
break
}
// add errors / failures, only for last retry
if retry == e.retry {
Copy link
Member

Choose a reason for hiding this comment

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

this should not be in the for loop

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

types.go Outdated
)

type (
Copy link
Member

Choose a reason for hiding this comment

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

if you decide to make a type block, you should put every in it.
it's up to you, but only one type block of repeat type everywhere

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@fsamin
Copy link
Member

fsamin commented Feb 18, 2017

we need timeout on executorwrapper too :)
and a context.Context for cancelation

@fsamin
Copy link
Member

fsamin commented Feb 18, 2017

i could be interesting to be able to user venom to run golang unit tests, by initializing a testcase with a slice of steps and a *testing.T (of *testing.B)

Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
@yesnault
Copy link
Member Author

@fsamin timeout : yep, but in another PR
@fsamin run golang unit tests -->

steps:
- type: go
  func: TestGetApplicationWithTriggersHandler
  package: github.com/ovh/cds/engine/api

--> like that ?

Whatever, it should be in another PR.

@fsamin
Copy link
Member

fsamin commented Feb 18, 2017

@yesnault

@fsamin fsamin merged commit c0ecdc7 into master Feb 18, 2017
@yesnault yesnault deleted the featRetry branch February 20, 2017 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants