Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

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

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 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

2 participants