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

Unified Diff: cmd/jujud/agent_test.go

Issue 13412047: Wait briefly for the API server to start.
Patch Set: Wait briefly for the API server to start. Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cmd/jujud/agent.go ('k') | provider/azure/config.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cmd/jujud/agent_test.go
=== modified file 'cmd/jujud/agent_test.go'
--- cmd/jujud/agent_test.go 2013-08-24 13:50:05 +0000
+++ cmd/jujud/agent_test.go 2013-09-10 23:29:08 +0000
@@ -20,6 +20,7 @@
envtools "launchpad.net/juju-core/environs/tools"
"launchpad.net/juju-core/juju/testing"
"launchpad.net/juju-core/state"
+ "launchpad.net/juju-core/state/api"
coretesting "launchpad.net/juju-core/testing"
coretools "launchpad.net/juju-core/tools"
"launchpad.net/juju-core/version"
@@ -107,19 +108,25 @@
// agentSuite is a fixture to be used by agent test suites.
type agentSuite struct {
- oldRestartDelay time.Duration
testing.JujuConnSuite
+ oldRestartDelay time.Duration
+ oldConnectionOptions api.DialOpts
}
func (s *agentSuite) SetUpSuite(c *gc.C) {
+ s.JujuConnSuite.SetUpSuite(c)
s.oldRestartDelay = worker.RestartDelay
+ s.oldConnectionOptions = apiConnectionOptions
+ apiConnectionOptions = api.DialOpts{
+ Timeout: 50 * time.Millisecond,
+ }
worker.RestartDelay = coretesting.ShortWait
- s.JujuConnSuite.SetUpSuite(c)
}
func (s *agentSuite) TearDownSuite(c *gc.C) {
+ worker.RestartDelay = s.oldRestartDelay
+ apiConnectionOptions = s.oldConnectionOptions
s.JujuConnSuite.TearDownSuite(c)
- worker.RestartDelay = s.oldRestartDelay
}
// primeAgent writes the configuration file and tools for an agent with the
« no previous file with comments | « cmd/jujud/agent.go ('k') | provider/azure/config.go » ('j') | no next file with comments »

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