Jingyi Hu
6bf609b96d
integration: update TestMemberPromote test
...
Update TestMemberPromote to include both learner not-ready and learner
ready test cases.
Removed unit test TestPromoteMember, it requires underlying raft node to
be started and running. The member promote is covered by the integration
test.
2019-05-28 18:50:13 -07:00
Jingyi Hu
f8ad8ae4ad
etcdserver: use etcdserver ErrLearnerNotReady
...
If learner is not ready to be promoted, use etcdserver.ErrLearnerNotReady
instead of using membership.ErrLearnerNotReady.
2019-05-28 18:50:13 -07:00
宇慕
dfe296ac3c
etcdserver: add mayPromote check
2019-05-28 18:47:03 -07:00
Jingyi Hu
7a4d233bab
clientv3/integration: better way to deflake test
...
Use ReadyNotify instead of time.Sleep to wait for server ready.
2019-05-28 18:47:03 -07:00
Jingyi Hu
aa4cda2f5c
etcdserver: allow 1 learner in cluster
...
Hard-coded the maximum number of learners to 1.
2019-05-28 18:47:03 -07:00
Jingyi Hu
d0c1b3fa38
etcdserver: learner return Unavailable for unsupported RPC
...
Make learner return code.Unavailable when the request is not supported
by learner. Client balancer will retry a different endpoint.
2019-05-28 18:47:03 -07:00
Gyuho Lee
34bd797e67
*: revert module import paths
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-05-28 15:39:35 -07:00
Jingyi Hu
23f1d02391
*: address comments
2019-05-15 15:58:46 -07:00
Jingyi Hu
90d28c0de7
clientv3/integration: deflake TestKVForLearner
...
Adding delay in the test for the newly started learner member to catch
up applying config change entries in raft log.
2019-05-15 13:58:28 -07:00
Jingyi Hu
b23c8f3e8f
clientv3/integration: fix cluster tests
...
Fixes TestMemberAddForLearner and TestMemberPromoteForLearner.
2019-05-15 13:58:26 -07:00
WizardCXY
a039f2efb8
clientv3, etcdctl: MemberPromote for learner
2019-05-15 13:48:52 -07:00
Jingyi Hu
57a11eb1e1
integration: add TestKVForLearner
...
Adding TestKVForLearner. Also adding test utility functions for clientv3
integration tests.
2019-05-15 13:27:38 -07:00
Jingyi Hu
2b76200f70
*: add MemberAddAsLearner to clientv3 Cluster API
...
Made changes to Clientv3 Cluster API:
- Added MemberAddAsLearner.
- Reverted changes to MemberAdd - removed input parameter isLearner.
2019-05-14 16:56:44 -07:00
Jingyi Hu
fc14608cb7
clientv3: support MemberAdd for learner
...
Added IsLearner flag to clientv3 MemberAdd API.
2019-05-14 13:10:22 -07:00
shivaramr
9150bf52d6
go modules: Fix module path version to include version number
2019-04-26 15:29:50 -07:00
zhoulin xie
cc08c1bd2e
clientv3/integration/leasing_test.go: Fix t.Fatalf error message
...
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-04-10 13:19:50 -04:00
Jingyi Hu
9bd86a647f
clientv3: Add TestMemberAddWithExistingURLs
...
TestMemberAddWithExistingURLs ensures adding a new member with URLs
already being used in the cluster will not succeed.
2019-03-18 12:48:44 -07:00
Xiang Li
e80d1745be
Merge pull request #10420 from spzala/watch10340
...
clientV3watch: do not return ctx canceled when Close watch
2019-03-08 11:57:44 -08:00
Sahdev P. Zala
b25edb62cc
clientV3watch: Watch Close should close successfully
...
Closing of watch by client will cancel the watch grpc stream and
can produce a context canceled error. However, since client
simply wanted to close the watcher the error can create confusion
that something went wrong instead of a successful close. Ensure
that Close do not return error.
Fixed #10340
2019-02-28 20:43:20 -05:00
caoming
94b782e7c9
clientv3/integration: add timeout case.
2019-02-18 09:38:49 +08:00
Xiang Li
3546c4868c
Merge pull request #10445 from spzala/fromkey9833
...
clientv3: fix WithFromKey
2019-02-07 14:50:13 -08:00
Sahdev P. Zala
313ab0ba47
clientv3: fix WithFromKey
...
The WithFromKey func should not return error similar to etcdctl usage
of it when an empty key is provided.
Fixed #9833
2019-02-02 19:21:49 -05:00
cfc4n
a033686acf
clientv3/integration: return err if err == rpctypes.ErrAuthNotEnable
2019-02-02 14:06:54 +08:00
nolouch
6ea54195a6
client/integration: try to fix tests
2018-09-18 01:44:57 +08:00
nolouch
c15fb607f6
server: broadcast leader changed
2018-09-17 14:15:04 +08:00
nolouch
fd5ef74b80
clientv3/integration: try to fix tests
2018-09-14 17:57:56 +08:00
nolouch
f3f6427586
server: prevent blocking
2018-09-14 16:08:29 +08:00
nolouch
4de27039cb
server: drop read request if found leader changed
2018-09-14 15:58:35 +08:00
Gyuho Lee
839f202195
clientv3/integration: fix race condition from closing channel
...
Go 1.11 now marks len(channel) over being-closed channel
as racey operation, fix tests by receiving from channel first
and then check the length of channel.
```
WARNING: DATA RACE
Write at 0x00c000e872c0 by goroutine 198:
runtime.closechan()
/usr/local/go/src/runtime/chan.go:327 +0x0
go.etcd.io/etcd/clientv3.(*lessor).closeRequireLeader()
/Users/leegyuho/go/src/go.etcd.io/etcd/clientv3/lease.go:379 +0x748
go.etcd.io/etcd/clientv3.(*lessor).recvKeepAliveLoop()
/Users/leegyuho/go/src/go.etcd.io/etcd/clientv3/lease.go:455 +0x3a5
Previous read at 0x00c000e872c0 by goroutine 27:
go.etcd.io/etcd/clientv3/integration.TestLeaseWithRequireLeader()
/Users/leegyuho/go/src/go.etcd.io/etcd/clientv3/integration/lease_test.go:828 +0x810
testing.tRunner()
/usr/local/go/src/testing/testing.go:827 +0x162
```
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 22:27:11 -07:00
Gyuho Lee
2ac04381a2
clientv3: update Go import paths to "go.etcd.io"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Gyuho Lee
aeb418b815
clientv3/integration: remove "transport.ErrConnClosing" match
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-08-09 19:27:37 -07:00
Joe Betz
67bcf28c4e
clientv3: Use passthrough resolver for direct endpoint dialing
2018-07-27 10:15:02 -07:00
Joe Betz
a2ecd6b676
clientv3: Simplify TestDialTLSNoConfig now that dial with grpc.WithBlock correctly results in a client timeout error
2018-07-24 10:45:03 -07:00
Joe Betz
b3b06a862a
clientv3: Fix maintenance APIs to directly dial grpc endpoints correctly.
2018-07-23 11:20:15 -07:00
Gyuho Lee
0458c5d54b
Merge pull request #9951 from gyuho/revive
...
*: integrate https://github.com/mgechev/revive with fmt tests
2018-07-23 06:39:33 -07:00
Gyuho Lee
f3385418bb
clientv3: fix keepalive send interval when response queue is full
...
client should update next keepalive send time
even when lease keepalive response queue becomes full.
Otherwise, client sends keepalive request every 500ms
regardless of TTL when the send is only expected to happen
with the interval of TTL / 3 at minimum.
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-22 17:59:32 -07:00
Gyuho Lee
90a5da18cf
clientv3: clean up code format
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-21 16:03:12 -07:00
Joe Betz
4b51b6de49
*: Add progress notify request watch request
2018-06-27 16:46:13 -07:00
Gyuho Lee
6e521d2f3f
clientv3: add "IsConnCanceled", deprecate "grpc.ErrClientConnClosing"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 14:47:08 -07:00
Joe Betz
3b84117f54
clientv3/integration: Add err check to TestDialTLSNoConfig to prevent nil pointer dereference on c.Close()
2018-06-15 13:41:28 -07:00
Joe Betz
55ef9cc1d0
clientv3: Add auth retry to retry interceptor
2018-06-15 13:41:28 -07:00
Joe Betz
a5b2fb5563
clientv3: Introduce custom retry interceptor based on go-grpc-middleware/retry
2018-06-15 13:41:28 -07:00
Joe Betz
1f6548b751
clientv3: Stop expecting retry in integration tests with new grpc balancer
2018-06-15 13:41:28 -07:00
Joe Betz
8569b9c782
clientv3: Fix endpoint resolver to create a new resolver for each grpc client connection
2018-06-15 13:41:28 -07:00
Joe Betz
9304d1abd1
clientv3: Fix TLS test failures by returning DeadlineExceeded error from dial without any additional wrapping
2018-06-15 13:41:28 -07:00
Gyuho Lee
7284e5a0a9
clientv3/integration: fix "TestMaintenanceSnapshotErrorInflight"
...
Errors from gRPC should be typed *status.statusError
=== RUN TestMaintenanceSnapshotErrorInflight
WARNING: 2018/05/29 11:43:21 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial unix localhost:55815860381826373260: connect: no such file or directory"; Reconnecting to {localhost:55815860381826373260 0 <nil>}
--- FAIL: TestMaintenanceSnapshotErrorInflight (2.42s)
maintenance_test.go:192: expected context deadline exceeded, got rpc error: code = DeadlineExceeded desc = context deadline exceeded
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-29 11:49:18 -07:00
Gyuho Lee
19eb8a5132
clientv3/integration: do not run fragmentation tests with gRPC Proxy
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-18 10:45:03 -07:00
Gyuho Lee
56ec416eba
clientv3/integration: test watch response fragmentation
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-14 13:34:54 -07:00
Gyuho Lee
f6a14fb72c
clientv3: use "zap" logger in integration tests
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-01 16:15:09 -07:00
Gyuho Lee
6dbce6b9a4
clientv3,etcdctl: support structured logger
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00