Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(126)

Issue 101740043: Make Joyent tests run faster

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by wallyworld
Modified:
9 years, 11 months ago
Reviewers:
mp+220894, axw, dave
Visibility:
Public.

Description

Make Joyent tests run faster Update dependencies and tweak code to use upstream fixes to Joyent libs which cache the parsing of the private signing key. https://code.launchpad.net/~wallyworld/juju-core/faster-joyent-tests/+merge/220894 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -14 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M dependencies.tsv View 1 chunk +4 lines, -4 lines 0 comments Download
M provider/joyent/config_test.go View 5 chunks +18 lines, -3 lines 3 comments Download
M provider/joyent/environ.go View 1 chunk +0 lines, -4 lines 0 comments Download
M provider/joyent/export_test.go View 1 chunk +4 lines, -0 lines 0 comments Download
M provider/joyent/local_test.go View 3 chunks +5 lines, -2 lines 2 comments Download
M provider/joyent/provider.go View 3 chunks +12 lines, -1 line 5 comments Download

Messages

Total messages: 4
wallyworld
Please take a look.
9 years, 11 months ago (2014-05-26 00:42:10 UTC) #1
axw
A few minor issues, but otherwise LGTM https://codereview.appspot.com/101740043/diff/1/provider/joyent/config_test.go File provider/joyent/config_test.go (right): https://codereview.appspot.com/101740043/diff/1/provider/joyent/config_test.go#newcode62 provider/joyent/config_test.go:62: s.PatchValue(&ssh.KeyBits, 32) ...
9 years, 11 months ago (2014-05-26 01:08:04 UTC) #2
dave_cheney.net
Minor comments, passes in 127s on pcc64el https://codereview.appspot.com/101740043/diff/1/provider/joyent/config_test.go File provider/joyent/config_test.go (right): https://codereview.appspot.com/101740043/diff/1/provider/joyent/config_test.go#newcode237 provider/joyent/config_test.go:237: continue barf, ...
9 years, 11 months ago (2014-05-26 01:35:08 UTC) #3
wallyworld
9 years, 11 months ago (2014-05-26 01:48:08 UTC) #4
https://codereview.appspot.com/101740043/diff/1/provider/joyent/config_test.go
File provider/joyent/config_test.go (right):

https://codereview.appspot.com/101740043/diff/1/provider/joyent/config_test.g...
provider/joyent/config_test.go:62: s.PatchValue(&ssh.KeyBits, 32)
On 2014/05/26 01:08:04, axw wrote:
> PatchValue should be used in a test, not in SetUpSuite. I think PatchValue is
> the wrong tool here, though. It should be reset directly after GenerateKey
> returns.
> 
> I'd split this out to another function which gets the original value and
defers
> a reset.

Done.

https://codereview.appspot.com/101740043/diff/1/provider/joyent/local_test.go
File provider/joyent/local_test.go (right):

https://codereview.appspot.com/101740043/diff/1/provider/joyent/local_test.go...
provider/joyent/local_test.go:105: s.restoreTimeouts =
envtesting.PatchAttemptStrategies(joyent.ShortAttempt)
On 2014/05/26 01:08:04, axw wrote:
> Why not use s.AddSuiteCleanup?

Cause I copied existing code. Changed here, had to wrap it in a func(*gc.C){}

https://codereview.appspot.com/101740043/diff/1/provider/joyent/provider.go
File provider/joyent/provider.go (right):

https://codereview.appspot.com/101740043/diff/1/provider/joyent/provider.go#n...
provider/joyent/provider.go:25: var shortAttempt = utils.AttemptStrategy{
On 2014/05/26 01:08:04, axw wrote:
> I think this should go in export_test.go until it's actually needed in the
> non-test code.

Done.

https://codereview.appspot.com/101740043/diff/1/provider/joyent/provider.go#n...
provider/joyent/provider.go:55: return nil, errors.New("cannot create
credentials without a private key")
On 2014/05/26 01:35:08, dfc wrote:
> why is this check needed, is auth.NewAuth likely to accept an empty private
key
> ?

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b