Anthony Romano
6f0cc54541
contrib/recipes: add election and double barrier recipes
...
these recipes rely on leases so they weren't included in the last batch
2016-01-27 15:44:51 -08:00
Anthony Romano
56fce9f386
contrib/recipes, integration: use clientv3
...
updating both together since there's a circular dependency
2016-01-27 14:37:51 -08:00
Gyu-Ho Lee
51e62aa007
integration: update gRPC, proto interface
2016-01-26 17:41:27 -08:00
Xiang Li
59c6735c3c
Merge pull request #4282 from xiang90/range_invalid
...
etcdserver: check invalid range in txn
2016-01-25 22:23:55 -08:00
Xiang Li
c8bf77c722
v3rpc: check max ops in txn
2016-01-25 21:04:19 -08:00
Xiang Li
128b5e7387
etcdserver: check invalid range in txn
2016-01-25 20:21:17 -08:00
Gyu-Ho Lee
77cf05364d
Merge pull request #4261 from gyuho/racey_e2e
...
*: detect leaky goroutines, fix leaks
2016-01-24 18:17:49 -08:00
Gyu-Ho Lee
96d2ee20e3
*: detect leaky goroutines, fix leaks
...
gexpect.Interact leaks. This adds ReadLine method to wait for the leaky
goroutine to accept an EOF.
Fixes https://github.com/coreos/etcd/issues/4258 .
Reference: https://github.com/coreos/etcd/pull/4261#issuecomment-174198945 .
2016-01-23 13:52:41 -08:00
Anthony Romano
5099bf6f7a
Merge pull request #4269 from heyitsanthony/v3-reject-put-bogus-lease
...
etcdserver: return error when putting a key with a bad lease id
2016-01-22 21:25:17 -08:00
Anthony Romano
9572197aee
etcdserver: return error when putting a key with a bad lease id
2016-01-22 20:47:31 -08:00
Gyu-Ho Lee
5e4113374b
integration: minor govet shadow fix
2016-01-22 14:40:21 -08:00
Anthony Romano
6c240b4037
Merge pull request #4262 from heyitsanthony/v3-lease-watch-expire
...
storage: publish delete events on lease revocation
2016-01-22 14:09:19 -08:00
Anthony Romano
b07900ae03
contrib: v3 recipes
...
Concurrency recipes using the V3 API (sans leases).
2016-01-22 13:46:22 -08:00
Anthony Romano
5a967eb2a0
storage: publish delete events on lease revocation
2016-01-22 13:40:55 -08:00
Anthony Romano
2e157530a0
etcdhttp, lease, v3api: forward keepalives to leader
...
keepalives don't go through raft so let follower peers announce
keepalives to the leader through the peer http handler
2016-01-22 12:40:40 -08:00
Anthony Romano
9113a27bde
lease: grant consistent lease IDs
...
When raft broadcasts a Grant to all nodes, all nodes must
agree on the same lease ID. Otherwise, attaching a key to
a lease will fail since the lease ID is node-dependent.
2016-01-22 09:43:39 -08:00
Gyu-Ho Lee
835d824965
*: minor typos, kill TODOs
2016-01-20 16:21:39 -08:00
Gyu-Ho Lee
39116e2e20
integration: TestV3WatchMultipleEventsPutUnsynced
2016-01-20 15:31:13 -08:00
Gyu-Ho Lee
96f646c586
integration: add more tests for unsynced watch
...
For https://github.com/coreos/etcd/issues/4216 .
2016-01-20 12:13:58 -08:00
Gyu-Ho Lee
8c40232198
integration: cancel operation for unsynced watcher
...
Related https://github.com/coreos/etcd/issues/4216 .
2016-01-20 11:28:31 -08:00
Gyu-Ho Lee
12362d292d
integration: add TestV3WatchMultipleStreams
...
Related https://github.com/coreos/etcd/issues/4216 .
2016-01-19 14:27:14 -08:00
Gyu-Ho Lee
166055b443
integration: watch test for multi-events with txn
...
Related to https://github.com/coreos/etcd/issues/4216 .
2016-01-19 13:47:09 -08:00
Anthony Romano
7e0a5b8ed7
integration: fix race in WatchFromCurrentRevision
...
Since watching from current revision, keys should be put after the
watcher is registered or the test may time out. Shows up in CI.
2016-01-19 12:30:49 -08:00
Anthony Romano
05531b4600
integration: test v3 RangeRequest
2016-01-17 22:03:08 -08:00
Gyu-Ho Lee
f9b505ae56
integration: use WaitResponse for watch tests
2016-01-17 14:11:30 -08:00
Gyu-Ho Lee
0f3573a57e
integration: add TestV3WatchMultiple
...
For https://github.com/coreos/etcd/issues/4216 .
2016-01-16 20:23:45 -08:00
Gyu-Ho Lee
2535509811
integration: add TestV3WatchCancel
...
Related https://github.com/coreos/etcd/issues/4216 .
2016-01-15 17:16:12 -08:00
Anthony Romano
9aea99cd6e
integration: submit keys concurrently with watcher streaming
...
Tests for races between producer and consumer on watcher
2016-01-15 10:57:33 -08:00
Gyu-Ho Lee
2f2b408686
integration: test header revision in v3 grpc
...
Related https://github.com/coreos/etcd/issues/4216 .
2016-01-14 21:26:13 -08:00
Gyu-Ho Lee
d036ac85cb
integration: add WatchFromCurrentRevision test
2016-01-14 16:44:59 -08:00
Gyu-Ho Lee
b6077f9d57
*: fix minor typos
2016-01-14 01:28:29 -08:00
Anthony Romano
53186da0a9
integration: a few v3 grpc api tests
2016-01-13 14:24:27 -08:00
Anthony Romano
6949f052c4
integration: add support for grpc server and client
2016-01-13 14:20:26 -08:00
Anthony Romano
b47f721a98
integration: configure cluster with configCluster struct
...
makes discovery, tls, and v3 explicitly part of the cluster information
2016-01-13 11:09:13 -08:00
Jonathan Boulle
b126ff77fb
tests: only check for go1.5+ once
2015-12-20 19:51:53 +01:00
Jonathan Boulle
d50fbe384a
tests: ignore leaked readLoop on go <1.5
2015-12-20 19:51:06 +01:00
Jonathan Boulle
e1fe7350a2
tests: update + enable check for leaked goroutines
...
Go 1.4 landed a new testing.M type [1][1] which allows for start-up and
shutdown hooks when running tests. The standard library now uses this
for checking for leaked goroutines in net/http [2][2].
This patch essentially re-ports the updated code from the net/http test
(we were using an older version of it) - in detail:
- updates the test to use `TestMain` instead of relying on
`TestGoroutinesRunning` to be implicitly run after all other tests
- adds a few new goroutines to the list of exceptions (the test itself,
as well as the golang/glog package and pkg/log.MergeLogger, both of
which spin off goroutines to handle log flushing/merging respectively)
- removes a couple of TODOs in the test for extra goroutines that's run
after individual tests (one of these re-enables the http package's
`.readLoop` and the other was an out-of-date TODO)
- re-enables the test
[1]: https://golang.org/pkg/testing/#M
[2]: https://github.com/golang/go/blob/release-branch.go1.4/src/net/http/main_test.go#L18
2015-12-20 19:51:06 +01:00
Yicheng Qin
207c92b627
rafthttp: build transport inside pkg instead of passed-in
...
rafthttp has different requirements for connections created by the
transport for different usage, and this is hard to achieve when giving
one http.RoundTripper. Pass into pkg the data needed to build transport
now, and let rafthttp build its own transports.
2015-10-11 21:42:37 -07:00
Yicheng Qin
305a0d7ab9
integration: extend request timeout
...
Extend request timeout to give etcd cluster enough time to return
response.
2015-09-21 16:50:22 -07:00
Yicheng Qin
92cd24d5bd
*: fix govet shadow check failure
2015-08-27 14:15:30 -07:00
Yicheng Qin
3702be476b
integration: only print critical log
...
This limits the logs printed out in integration test, so it will not
have log flood and help us read fatal log in travis.
2015-08-23 21:22:21 -07:00
Xiang Li
6b23a8131f
*: test gofmt with -s and fix reported issues
2015-08-21 18:52:16 -07:00
Yicheng Qin
ffae601af5
etcdmain: calculate dial timeout for peer transport
...
This helps peer communication in globally-deployed cluster.
2015-08-17 16:52:53 -07:00
Xiang Li
a7b9bff939
store: add 0 as padding for better lexicographic sorting.
2015-08-13 13:42:37 -07:00
Yicheng Qin
c3d4d11402
etcdhttp: adjust request timeout based on config
...
It uses heartbeat interval and election timeout to estimate the
expected request timeout.
This PR helps etcd survive under high roundtrip-time environment,
e.g., globally-deployed cluster.
2015-08-12 09:22:59 -07:00
Yicheng Qin
e7ed7a7b7a
integration: always check error for function calls
2015-07-06 17:44:36 -07:00
Yicheng Qin
8e79fd85cb
integration: fix bind-addr-in-use
...
The bug happens when restarted member wants to listen on its original
port, but finds out that it has been occupied by some client.
Use well-known port instead of ephemeral port, so client cannot occupy
the listen port anymore.
2015-06-23 14:47:21 -07:00
Yicheng Qin
796d99c390
integration: fix TestIssue2904 when multiple cores
...
Do not wait for the cluster view of removed member to match with
expected view, since removed member does not apply entries after it is
removed.
2015-06-12 10:20:27 -07:00
Yicheng Qin
8725e69cf7
etcdserver: allow to update attributes of removed member
...
There exist the possiblity to update attributes of removed member in
reasonable workflow:
1. start member A
2. leader receives the proposal to remove member A
2. member A sends the proposal of update its attribute to the leader
3. leader commits the two proposals
So etcdserver should allow to update attributes of removed member.
2015-06-10 16:52:18 -07:00
Barak Michener
a88a53274f
security: Lazily create the security directories. Fixes #2755 , may find new instances for #2741
...
revert the kv integration test
fix nits
amend security mention of GUEST
2015-05-18 17:28:04 -04:00