Merge lp:~niemeyer/juju-core/state-cut-test-timing into lp:~juju/juju-core/trunk

Proposed by Gustavo Niemeyer
Status: Merged
Merged at revision: 542
Proposed branch: lp:~niemeyer/juju-core/state-cut-test-timing
Merge into: lp:~juju/juju-core/trunk
Diff against target: 34 lines (+3/-3)
2 files modified
state/relation_test.go (+1/-1)
state/ssh_test.go (+2/-2)
To merge this branch: bzr merge lp:~niemeyer/juju-core/state-cut-test-timing
Reviewer Review Type Date Requested Status
The Go Language Gophers Pending
Review via email: mp+125512@code.launchpad.net

Description of the change

state: get a few seconds back from tests

Tests are back to 20+ seconds. Cut down new negative
path delays to buy a few seconds back.

https://codereview.appspot.com/6549044/

To post a comment you must log in.
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Reviewers: mp+125512_code.launchpad.net,

Message:
Please take a look.

Description:
state: get a few seconds back from tests

Tests are back to 20+ seconds. Cut down new negative
path delays to buy a few seconds back.

https://code.launchpad.net/~niemeyer/juju-core/state-cut-test-timing/+merge/125512

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/6549044/

Affected files:
   A [revision details]
   M state/relation_test.go
   M state/ssh_test.go

Index: [revision details]
=== 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: <email address hidden>
+New revision: <email address hidden>

Index: state/relation_test.go
=== modified file 'state/relation_test.go'
--- state/relation_test.go 2012-09-20 11:08:11 +0000
+++ state/relation_test.go 2012-09-20 15:34:42 +0000
@@ -474,7 +474,7 @@
    select {
    case ch, ok := <-w.Changes():
     c.Fatalf("got unwanted change: %#v, %t", ch, ok)
- case <-time.After(100 * time.Millisecond):
+ case <-time.After(50 * time.Millisecond):
    }
   }
  }

Index: state/ssh_test.go
=== modified file 'state/ssh_test.go'
--- state/ssh_test.go 2012-09-19 14:14:33 +0000
+++ state/ssh_test.go 2012-09-20 15:34:42 +0000
@@ -243,7 +243,7 @@
   // The SSH forwarder will have tried to start the SSH
   // client, but it will fail because there's no daemon to
   // connect to. Wait a while to allow this to happen.
- time.Sleep(500 * time.Millisecond)
+ time.Sleep(200 * time.Millisecond)

   // Start the daemon and the client.
   c.Logf("--------- starting sshd")
@@ -257,7 +257,7 @@
   // The SSH client process should now successfully start,
   // but the client will fail to connect because the server
   // has not been started. Wait a while for this to happen.
- time.Sleep(2000 * time.Millisecond)
+ time.Sleep(1 * time.Second)

   // Start the server to finally allow the full connection
   // to take place.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

<davecheney> niemeyer: +1

https://codereview.appspot.com/6549044/

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

*** Submitted:

state: get a few seconds back from tests

Tests are back to 20+ seconds. Cut down new negative
path delays to buy a few seconds back.

R=
CC=
https://codereview.appspot.com/6549044

https://codereview.appspot.com/6549044/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'state/relation_test.go'
2--- state/relation_test.go 2012-09-20 11:08:11 +0000
3+++ state/relation_test.go 2012-09-20 15:36:23 +0000
4@@ -474,7 +474,7 @@
5 select {
6 case ch, ok := <-w.Changes():
7 c.Fatalf("got unwanted change: %#v, %t", ch, ok)
8- case <-time.After(100 * time.Millisecond):
9+ case <-time.After(50 * time.Millisecond):
10 }
11 }
12 }
13
14=== modified file 'state/ssh_test.go'
15--- state/ssh_test.go 2012-09-19 14:14:33 +0000
16+++ state/ssh_test.go 2012-09-20 15:36:23 +0000
17@@ -243,7 +243,7 @@
18 // The SSH forwarder will have tried to start the SSH
19 // client, but it will fail because there's no daemon to
20 // connect to. Wait a while to allow this to happen.
21- time.Sleep(500 * time.Millisecond)
22+ time.Sleep(200 * time.Millisecond)
23
24 // Start the daemon and the client.
25 c.Logf("--------- starting sshd")
26@@ -257,7 +257,7 @@
27 // The SSH client process should now successfully start,
28 // but the client will fail to connect because the server
29 // has not been started. Wait a while for this to happen.
30- time.Sleep(2000 * time.Millisecond)
31+ time.Sleep(1 * time.Second)
32
33 // Start the server to finally allow the full connection
34 // to take place.

Subscribers

People subscribed via source and target branches