-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Faster tests #2570
Faster tests #2570
Conversation
dgageot
commented
Jul 30, 2019
•
edited
Loading
edited
- Optimize all tests that take over .6s
- Use t.Override in placed where it should be used
- Remove TestRemoteDigest that was not really testing anything
- Run git tests in parallel
Codecov Report
|
This PR decreases a bit the code coverage but it was code that was executed only by error. |
+ Optimize all tests that take over .6s + Use t.Override in placed where it should be used + Remove TestRemoteDigest that was not really testing anything + Run git tests in parallel Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
@@ -81,6 +83,9 @@ func TestCreateNewRunner(t *testing.T) { | |||
} | |||
for _, test := range tests { | |||
testutil.Run(t, test.description, func(t *testutil.T) { | |||
t.Override(&update.GetLatestAndCurrentVersion, func() (semver.Version, semver.Version, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! didn't know all tests were doing the update check.
|
||
defaultPollPeriodInMilliseconds = 100 | ||
defer func() { defaultPollPeriodInMilliseconds = originalPollingPeriod }() | ||
t.Override(&executeRolloutStatus, test.mock.Executefunc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how did this get fixed?