Merge lp:~axwalk/juju-core/lp1282692-test-bootstrapssh-timesensitive into lp:~go-bot/juju-core/trunk
Proposed by
Andrew Wilkins
Status: | Merged |
---|---|
Approved by: | Andrew Wilkins |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2678 |
Proposed branch: | lp:~axwalk/juju-core/lp1282692-test-bootstrapssh-timesensitive |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
15 lines (+1/-4) 1 file modified
provider/common/bootstrap_test.go (+1/-4) |
To merge this branch: | bzr merge lp:~axwalk/juju-core/lp1282692-test-bootstrapssh-timesensitive |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+216997@code.launchpad.net |
Commit message
provider/common: fix time-sensitive test
Test unnecessarily uses a goroutine; we
can just prime the "interrupted" channel
before calling into WaitSSH.
Fixes lp:1282692
Description of the change
provider/common: fix time-sensitive test
Test unnecessarily uses a goroutine; we
can just prime the "interrupted" channel
before calling into WaitSSH.
Fixes lp:1282692
To post a comment you must log in.
Reviewers: mp+216997_ code.launchpad. net,
Message:
Please take a look.
Description:
provider/common: fix time-sensitive test
Test unnecessarily uses a goroutine; we
can just prime the "interrupted" channel
before calling into WaitSSH.
Fixes lp:1282692
https:/ /code.launchpad .net/~axwalk/ juju-core/ lp1282692- test-bootstraps sh-timesensitiv e/+merge/ 216997
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/97730043/
Affected files (+3, -4 lines): common/ bootstrap_ test.go
A [revision details]
M provider/
Index: [revision details] 20140424054112- tzfpqi85a2hve52 c
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: provider/ common/ bootstrap_ test.go common/ bootstrap_ test.go' common/ bootstrap_ test.go 2014-04-24 02:27:38 +0000 common/ bootstrap_ test.go 2014-04-24 08:15:45 +0000 edWaitingForAdd resses( c *gc.C) { Context( c) coretesting. Stderr( ctx), gc.Matches, "Waiting for address\n")
=== modified file 'provider/
--- provider/
+++ provider/
@@ -250,10 +250,7 @@
func (s *BootstrapSuite) TestWaitSSHKill
ctx := coretesting.
interrupted := make(chan os.Signal, 1)
- go func() {
- <-time.After(2 * time.Millisecond)
- interrupted <- os.Interrupt
- }()
+ interrupted <- os.Interrupt
_, err := common.WaitSSH(ctx, interrupted,
ssh.DefaultClient, "/bin/true", neverAddresses{}, testSSHTimeout)
c.Check(err, gc.ErrorMatches, "interrupted")
c.Check(