Commit Graph

23 Commits

Author SHA1 Message Date
James Phillips 3795f17b3b
Adds back the port shuffle on agent start retries. 2017-06-02 20:53:20 -07:00
Frank Schroeder 00117ed09b
test: we will not use dev mode for testing for now 2017-05-31 11:34:00 +02:00
Frank Schroeder d14182c2de
test: stagger retry attempts of TestAgent.Start 2017-05-31 11:33:25 +02:00
Frank Schroeder 5224699341
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 cfe101ce49
test: use test name as log prefix 2017-05-31 09:54:09 +02:00
Frank Schroeder 361b69bb30
test: Use Bool() instead of &BoolTrue/False since 2017-05-31 09:21:01 +02:00
Frank Schroeder bb8a21c385
Address review comments 2017-05-31 01:05:21 +02:00
Frank Schroeder 42ade30551
test: allow tests to control anti-entropy syncs 2017-05-31 00:29:28 +02:00
Frank Schroeder 5735b31ebc
test: run mock dns recursors on random ports 2017-05-31 00:29:28 +02:00
Frank Schroeder 828f40054a
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 f53b90c16b
test: start sync after agent start 2017-05-31 00:29:27 +02:00
Frank Schroeder bb3b099d60
test: add test name to output 2017-05-31 00:29:27 +02:00
Frank Schroeder 9fbac59f78
test: perform blocking query on agent 2017-05-31 00:29:27 +02:00
Frank Schroeder 60a47addc7
test: Shutdown half-started agent before retrying 2017-05-31 00:29:25 +02:00
Frank Schroeder b9ae289e34
test: remove ACL options from default test config 2017-05-31 00:29:25 +02:00
Frank Schroeder e8651261f9
test: allocate ports in blocks of 10 2017-05-31 00:29:24 +02:00
Frank Schroeder 26474ce9c2
test: refactor command tests to use TestAgent 2017-05-31 00:29:24 +02:00
Frank Schroeder 98ac791577
test: retry a bit more often 2017-05-31 00:29:24 +02:00
Frank Schroeder 5cdfd3789f
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 f6cc2c3fbb
test: use less aggressive retry for agent startup 2017-05-31 00:29:24 +02:00
Frank Schroeder 51a56cb973
test: use system temp dir for TestAgent 2017-05-31 00:29:24 +02:00
Frank Schroeder a02485462e
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 2e829f8917
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