Commit Graph

23 Commits

Author SHA1 Message Date
James Phillips b4b5036dfb
Adds back the port shuffle on agent start retries. 2017-06-02 20:53:20 -07:00
Frank Schroeder dcc68f0f85
test: we will not use dev mode for testing for now 2017-05-31 11:34:00 +02:00
Frank Schroeder f89ae9f7e7
test: stagger retry attempts of TestAgent.Start 2017-05-31 11:33:25 +02:00
Frank Schroeder bdfed817ee
test: make TestAgent setup reusable
Pick the random ports only once and try starting with them
a number of times so that the configuration can be re-used.
This is because the ports are written into the data files
and a subsequent agent reading the files needs to have the
same ports.

For the same reason we do not remove the data directory on
every attempt since this makes it impossible to re-read the
data files.
2017-05-31 11:32:31 +02:00
Frank Schroeder 345666bdb6
test: use test name as log prefix 2017-05-31 09:54:09 +02:00
Frank Schroeder ceda18366f
test: Use Bool() instead of &BoolTrue/False since 2017-05-31 09:21:01 +02:00
Frank Schroeder ec729693d7
Address review comments 2017-05-31 01:05:21 +02:00
Frank Schroeder f498f24032
test: allow tests to control anti-entropy syncs 2017-05-31 00:29:28 +02:00
Frank Schroeder eea16e1640
test: run mock dns recursors on random ports 2017-05-31 00:29:28 +02:00
Frank Schroeder 0a31094e06
test: improve TestAgent
* don't use retry to try restarting the agent
  this caused some issues when the startup would fail in
  a separate go routine

* clear out the data directory on every retry since the ports
  are stored in the raft data files

* set a unique id for every agent to allow for tracking of
  concurrent output
2017-05-31 00:29:28 +02:00
Frank Schroeder 2e14c09447
test: start sync after agent start 2017-05-31 00:29:27 +02:00
Frank Schroeder 5b5566d916
test: add test name to output 2017-05-31 00:29:27 +02:00
Frank Schroeder 28ed8f1847
test: perform blocking query on agent 2017-05-31 00:29:27 +02:00
Frank Schroeder 8c1a668481
test: Shutdown half-started agent before retrying 2017-05-31 00:29:25 +02:00
Frank Schroeder 0f912c8aad
test: remove ACL options from default test config 2017-05-31 00:29:25 +02:00
Frank Schroeder bc47972696
test: allocate ports in blocks of 10 2017-05-31 00:29:24 +02:00
Frank Schroeder 53c1c86ab3
test: refactor command tests to use TestAgent 2017-05-31 00:29:24 +02:00
Frank Schroeder 24eec373de
test: retry a bit more often 2017-05-31 00:29:24 +02:00
Frank Schroeder 141efd9588
test: rename *Config vars to 'cfg'
'c' is ambigous since Command also uses this
and we want to use 'config' as a package name.
2017-05-31 00:29:24 +02:00
Frank Schroeder 06677708cf
test: use less aggressive retry for agent startup 2017-05-31 00:29:24 +02:00
Frank Schroeder 47501309ae
test: use system temp dir for TestAgent 2017-05-31 00:29:24 +02:00
Frank Schroeder 308f9929b3
test: run agent tests in parallel
This brings down the test run from 108 sec to 15 sec.

There is an occasional port conflict because of the nature
the next port is chosen. So far it seems rare enough to live
with it.
2017-05-31 00:29:23 +02:00
Frank Schroeder b5b3aa1376
agent: add TestAgent to replace other mechanisms
TestAgent will replace the following mechanisms to
start test agents in subsequent requests:

 * makeAgentXXX
 * makeDNSServerXXX
 * makeHTTPServerXXX
 * testServer
 * httpTest
2017-05-31 00:29:23 +02:00