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

Fix slow tests caused by retry backoff #1598

Merged
merged 1 commit into from Dec 12, 2022

Conversation

armsnyder
Copy link
Contributor

@armsnyder armsnyder commented Dec 11, 2022

I disabled retry backoffs in tests to reduce the overall test run time from 25 seconds to under 1 second.

Before:

% ~/go/bin/gotestsum --jsonfile out.json
✓  . (25.685s)
% ~/go/bin/gotestsum tool slowest --jsonfile out.json
github.com/xanzy/go-gitlab TestInstanceClustersService_AddCluster_StatusInternalServerError 12.08s
github.com/xanzy/go-gitlab TestInstanceVariablesService_StatusInternalServerError 11.73s
github.com/xanzy/go-gitlab TestUploadFile_Retry 710ms
github.com/xanzy/go-gitlab TestUploadAvatar_Retry 710ms

After:

% ~/go/bin/gotestsum --jsonfile out.json
✓  . (425ms)
% ~/go/bin/gotestsum tool slowest --jsonfile out.json

gitlab_test.go Show resolved Hide resolved
Copy link
Member

@svanharmelen svanharmelen left a comment

Choose a reason for hiding this comment

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

I've taken another look at the involved tests and guess you are right... So I'll take it... 👍🏻

@svanharmelen svanharmelen merged commit 52eedaa into xanzy:master Dec 12, 2022
@armsnyder armsnyder deleted the fix-slow-tests branch December 12, 2022 22:45
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

2 participants