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

test: Add progress logs to create_dids_to_file scenario #1386

Merged
merged 1 commit into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/bdd/did_orb_steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,7 @@ func (r *createDIDRequest) Invoke() (interface{}, error) {
resp, respErr = r.httpClient.Post(u, reqBytes, "application/json")
if respErr != nil {
if r.shouldRetry(nil, respErr) {
logger.Infof("Error posting request to [%s] on attempt %d: %s. Retrying in %s",
logger.Warnf("Error posting request to [%s] on attempt %d: %s. Retrying in %s",
u, i+1, respErr, r.backoff)

r.greylist.Add(u)
Expand All @@ -2030,7 +2030,7 @@ func (r *createDIDRequest) Invoke() (interface{}, error) {
continue
}

logger.Infof("Error posting request to [%s]: %s. Not retrying.", u, respErr)
logger.Errorf("Error posting request to [%s]: %s. Not retrying.", u, respErr)

return "", respErr
}
Expand All @@ -2042,12 +2042,12 @@ func (r *createDIDRequest) Invoke() (interface{}, error) {
}

if !r.shouldRetry(resp, nil) {
logger.Infof("Got HTTP response from [%s]: %d:%s. Not retrying.", u, resp.StatusCode, resp.ErrorMsg)
logger.Errorf("Got HTTP response from [%s]: %d:%s. Not retrying.", u, resp.StatusCode, resp.ErrorMsg)

return "", respErr
}

logger.Infof("Got HTTP response from [%s]: %d:%s. Retrying in %s", u, resp.StatusCode, resp.ErrorMsg, r.backoff)
logger.Warnf("Got HTTP response from [%s]: %d:%s. Retrying in %s", u, resp.StatusCode, resp.ErrorMsg, r.backoff)

time.Sleep(r.backoff)
}
Expand Down
4 changes: 2 additions & 2 deletions test/bdd/workerpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ func (p *WorkerPool) listen() {

if len(p.responses)%100 == 0 {
if p.taskDescription != "" {
logger.Debugf("Got %d responses for task [%s]", len(p.responses), p.taskDescription)
logger.Warnf("Got %d responses for task [%s]", len(p.responses), p.taskDescription)
} else {
logger.Debugf("Got %d responses", len(p.responses))
logger.Warnf("Got %d responses", len(p.responses))
}
}
}
Expand Down