ef0ba361df
etcdhttp: add test for expiration time
2014-09-24 15:46:40 -07:00
c28fd92d10
etcdserver: extend storeRecorder to test parameters
2014-09-24 14:33:51 -07:00
e97134e767
etcdserver: eliminate race in sync test
2014-09-23 15:49:20 -07:00
c6cb635e01
etcdserver: refine comments of config change tests
2014-09-23 13:03:30 -07:00
bc7b0108dc
raft: ConfigChange -> ConfChange
2014-09-23 12:02:44 -07:00
d92931853e
raft: Config -> ConfigChange
...
Configure -> ProposeConfigChange
AddNode, RemoveNode -> ApplyConfigChange
2014-09-22 23:39:53 -07:00
dc36ae7058
raft: use pb.Config instead of []byte for Configure
2014-09-22 15:44:47 -07:00
b82d70871f
raft: use EntryType in protobuf
2014-09-22 15:44:46 -07:00
aaffb9eb78
etcdserver: add AddNode, RemoveNode
...
AddNode and RemoveNode is used to propose config change to the cluster.
If succeeds, it will add/remove node from the cluster.
2014-09-22 15:44:46 -07:00
7d1126fb35
etcdserver: init time.Time only if Expiration > 0
...
golang's concept of "zero" time does not align with the zero value of
a unix timestamp. Initializing time.Time with a unix timestamp of 0
makes time.Time.IsZero fail. Solve this by initializing time.Time only
if we care about the time.
2014-09-22 15:31:31 -07:00
8ba801ec06
etcdserver: fix sync tests
...
This is to fix possible testing failures caused by sync tests.
Changes:
1. Get rid of time sleep operations, which introduces uncertainty.
2. Use fake Store.
2014-09-20 17:41:30 -07:00
ddfcb67ce3
Merge pull request #1118 from unihorn/133
...
etcdserver: add TestRecvSnapshot
2014-09-20 17:10:01 -07:00
fac38aad33
etcdserver: add TestRecvSlowSnapshot
2014-09-19 15:09:04 -07:00
b8e59a3c6a
etcdserver: not push ready to readyNode automatically
2014-09-19 14:40:11 -07:00
f2ebd64a1b
*: add testutil pkg
2014-09-19 14:32:38 -07:00
4eb156a324
Merge pull request #1104 from unihorn/132
...
etcdserver: add TestDoBadLocalAction
2014-09-19 09:30:34 -07:00
d5988c3ec2
etcdserver: add TestDoBadLocalAction
2014-09-19 09:22:26 -07:00
44ab66d858
etcdserver: add TestRecvSnapshot
2014-09-18 23:19:00 -07:00
91003cb994
*: s/prevExists/prevExist/
2014-09-18 21:25:08 -07:00
a42d52482c
etcdserver: use simple PRNG for GenID
2014-09-17 15:29:14 -07:00
f2e92d9140
Merge pull request #1097 from unihorn/130
...
etcdserver: use Action to fix possible data race
2014-09-17 14:28:37 -07:00
b66a40495d
raft: introduce Node interface
2014-09-17 14:18:56 -07:00
ab61a8aa9a
*: init for on disk snap support
2014-09-17 13:56:12 -07:00
0ad0e24a86
etcdserver: use Action to fix possible data race
2014-09-17 13:48:03 -07:00
a91d745c46
etcdserver: refine printout
2014-09-16 14:54:22 -07:00
023dc7cba2
etcdserver: add SYNC request
2014-09-16 13:42:03 -07:00
8a5ab2ec06
etcdserver: introduce Server interface
...
This changes etcdserver.Server to an interface, with the former Server
(now "EtcdServer") becoming the canonical/production implementation.
This will facilitate better testing of the http server et al with mock
implementations of the interface.
It also more clearly defines the boundary for users of the Server.
2014-09-15 15:11:01 -07:00
9bf2c2ed9d
Merge pull request #1052 from unihorn/121
...
server: add unit tests
2014-09-15 13:20:50 -07:00
6cd4434ff3
server: add unit tests
...
Make test coverage >= 90%
2014-09-15 13:16:48 -07:00
54b9c55af3
etcdserver: remove useless sleep
...
etcdserver.Do will block until there exists leader
2014-09-12 13:01:33 -07:00
0e0fc2bd24
raft: use [1,n] as address list for raft state machines
2014-09-11 19:23:05 -07:00
4e31bb308d
raft: use const firstId to track ids
2014-09-09 19:07:20 -07:00
8c58684fb7
etcdserver: fix testServer
2014-09-09 16:59:42 -07:00
d844377ca6
*: vendor context
2014-09-03 20:06:16 -07:00
3c77693881
raft: make tick send out messages. all state machine actions should be taken inside step function.
2014-09-03 10:17:09 -07:00
2ba57ee75d
*: remove unused pkgs
2014-09-03 09:20:20 -07:00