Commit Graph

315 Commits (ad57fea4c59e1e9d60b26c6a9d7fc48b0bb79a64)

Author SHA1 Message Date
Gyu-Ho Lee 2c13231e7b clientv3/integration: increase balancer switch timeout for TestKVGetResetLoneEndpoint
Since 3-second is the minimum time to keep an endpoint in unhealthy,
it is possible that endpoint switch happens right after context timeout.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-31 10:48:15 -07:00
Gyu-Ho Lee 8d23e1c870 clientv3/integration: add blackhole tests for range RPCs
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-30 19:18:53 -07:00
Gyu-Ho Lee a37dd0055f clientv3/integration: move to TestBalancerUnderBlackholeKeepAliveWatch
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-30 17:19:48 -07:00
Gyu-Ho Lee 8d5c284b6c clientv3/integration: add blackhole tests on mutable operations
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-30 13:32:59 -07:00
Gyu-Ho Lee bea930f44d clientv3/integration: finish isolated node test cases
1. one with retry
2. one without retry (range request with longer timeouts)

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-30 11:17:43 -07:00
Gyu-Ho Lee ca1e6a74e0
Merge pull request #8782 from gyuho/rename
clientv3/integration: rename to 'mustWaitPinReady'
2017-10-27 15:07:31 -07:00
Gyu-Ho Lee 5d169b866f clientv3/integration: rename to 'mustWaitPinReady'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-27 15:00:31 -07:00
Gyu-Ho Lee 03ce2fa037 clientv3/integration: remove client keepalive in network partition tests
Those tests are about balancer endpoint switch, not about keepalive pings.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-27 14:47:37 -07:00
Xiang Li 2cea13ba68
Merge pull request #8779 from gyuho/shutdown-test
clientv3/integration: add TestBalancerUnderServerShutdownImmutable
2017-10-27 12:23:22 -07:00
Gyu-Ho Lee 732c40531b
Merge pull request #8762 from gyuho/partition-test
clientv3/integration: add TestBalancerUnderNetworkPartitionWatch
2017-10-27 12:22:32 -07:00
Gyu-Ho Lee 62821158aa
Merge pull request #8767 from xiang90/f
clientv3/integration: fix a todo in testNetworkPartitionBalancer
2017-10-27 11:26:40 -07:00
Gyu-Ho Lee 9d95cfb105 clientv3/integration: add TestBalancerUnderServerShutdownImmutable
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-27 10:55:12 -07:00
Gyu-Ho Lee e980bde82d clientv3/integration: add TestBalancerUnderNetworkPartitionWatch
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-26 18:17:00 -07:00
Gyu-Ho Lee 0bfc6a0d92 clientv3/integration: add TestBalancerUnderServerShutdownMutable*
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-26 16:42:33 -07:00
Gyu-Ho Lee 6a8d6b6ad9 clientv3/integration: use waitPinReady in blackhole test
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-26 15:12:27 -07:00
Gyu-Ho Lee af53f54042 clientv3/integration: add waitPinReady
RPC should be sent to trigger 'readyWait' on new pin address.
Otherwise, endpoints other than ep[0] may be pinned.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-26 15:11:10 -07:00
Xiang 10c971db70 clientv3/integration: add put blackhole test 2017-10-26 14:09:51 -07:00
Xiang 7d7e9b6e43 clientv3/integration: fix a todo in testNetworkPartitionBalancer 2017-10-25 22:54:44 -07:00
Gyu-Ho Lee 8fa35216b0 clientv3/integration: Get with context timeout
Address https://github.com/coreos/etcd/pull/8762#discussion_r147019068.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-25 17:43:29 -07:00
Xiang Li 995d79a0fc Merge pull request #8758 from gyuho/failure-test
clientv3/integration: add TestBalancerUnderServerShutdownWatch
2017-10-25 17:03:33 -07:00
Gyu-Ho Lee cea7387b73 clientv3/integration: add TestBalancerUnderServerShutdownWatch
Current Watch integration tests haven't covered the balancer
switch behavior under server failures.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-25 16:13:46 -07:00
Gyu-Ho Lee c50cfbeaf6 Merge pull request #8759 from gyuho/mmm
integration: use variadic parameters for *Partition
2017-10-25 15:31:33 -07:00
Gyu-Ho Lee 6f8c476599 clientv3/integration: rename partition tests
To be consistent with TestBalancerUnderShutdown*

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-25 14:57:16 -07:00
Gyu-Ho Lee b6f770fc24 integration: use variadic parameters for *Partition
'member' type is not exported.
In network partition tests, we want do

InjectPartition(t, clus.Members[lead], clus.Members[lead+1])

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-25 14:55:03 -07:00
Gyu-Ho Lee ff2ed93b5c clientv3/integration: do not create v3 clients when not used
Add 'SkipCreatingClients' field to skip creating clients if not used.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-24 16:59:41 -07:00
Xiang 8d1f9c654a clientv3/integration: fix keepalive by waiting for unhealthy 2017-10-24 00:56:09 -07:00
Gyu-Ho Lee 2a49b04f09 clientv3/integration: fix typos
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-23 20:13:53 -07:00
Xiang Li b699c7cff7 Merge pull request #8737 from xiang90/fix_TestWatchKeepAlive
clientv3/integration: shorten keepalive timeout
2017-10-22 21:21:22 -07:00
Xiang f65575073a clientv3/integration: match ErrTimeout in testNetworkPartitionBalancer
For put, etcd can return timeout errors from network partitions.
2017-10-22 18:44:35 -07:00
Xiang 3899f9e3c5 clientv3/integration: shorten keepalive timeout 2017-10-22 18:02:15 -07:00
Xiang Li 5eef654c3c Merge pull request #8734 from xiang90/testing_log
clientv3: disable server logging for client testing
2017-10-22 16:50:21 -07:00
Xiang 6f0771d2f6 clientv3: disable server logging for client testing 2017-10-22 16:32:42 -07:00
Xiang 06e591d526 clientv3/integration: skip retry test on txn read 2017-10-22 16:14:39 -07:00
Gyu-Ho Lee 7f2b6a19d6 clientv3: fix typo in 'testNetworkPartitionBalancer'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-10 16:07:03 -07:00
Gyu-Ho Lee 8224c748c9 clientv3/integration: add balancer network partition tests
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-09 14:54:47 -07:00
Gyu-Ho Lee 0199bdc266 *: fix 'ineffassign' issues
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-03 10:14:33 -07:00
lorneli aac652009d clientv3/integration: test leasing txn invalidates deleted cache
Test cache invalidating in txnLeasing.commitToCache function.
2017-09-30 13:04:06 +08:00
Gyu-Ho Lee 65ffb52e5f clientv3/integration: add TestWatchKeepAlive
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-28 15:35:29 -07:00
Gyu-Ho Lee 636815909d clientv3/integration: match context errors to stopped server
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-27 13:12:08 -07:00
Gyu-Ho Lee 92f5746c54 clientv3/integration: fix license, minor nits in leasing_test.go
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-27 09:23:39 -07:00
Anthony Romano 49e5e78d0f clientv3/integration: test endpoint switches on partitioned member 2017-09-16 13:55:39 -07:00
Gyu-Ho Lee 0b2d8a6c96 *: fix minor typos
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-11 07:33:35 -07:00
Gyu-Ho Lee f65aee0759 *: replace 'golang.org/x/net/context' with 'context'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
Anthony Romano 2d0eec0b35 clientv3: goword spelling check 2017-09-06 22:11:33 -07:00
Gyu-Ho Lee 15c3c1be28 *: replace 'grpc.ErrClientConnTimeout' with 'context.DeadlineExceeded'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-05 14:10:43 -07:00
Anthony Romano cf0a07be52 integration: test leasing client does not acuire lease on TTL'd keys 2017-08-21 12:11:19 -07:00
Anthony Romano 126e91c449 leasing, integration, etcdmain: closer function for leasing kv
Semaphore was seeing goroutine leaks
2017-08-18 14:05:57 -07:00
Gyu-Ho Lee 556c1a1fe0 integration,clientv3/integration: test LeaseLeases API
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-14 14:18:57 -07:00
Anthony Romano cf0eb3b7ce integration: increase timeout for TestLeasingReconnectOwnerRevoke
Adding retry to acquire on failure causes Get to now retry until a
connection can be reestablished to the etcd server, causing the
timeout to trigger and fail the test.
2017-08-07 15:51:27 -07:00
Gyu-Ho Lee 9982cd0528 clientv3/integration: add 'TestMaintenanceHashKV'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-05 18:17:06 -07:00
Anthony Romano 468078ffcd integration: leasing tests 2017-08-04 11:35:36 -07:00
visheshnp a425e98a7e leasing: KV leasing 2017-08-04 11:35:36 -07:00
Anthony Romano d543870966 Merge pull request #8347 from heyitsanthony/use-from-grpc-md
clientv3: use FromOutgoingContext to bucket watches
2017-08-01 17:05:56 -07:00
Gyu-Ho Lee 45e6b658dd Merge pull request #8349 from gyuho/fix-lease-test
clientv3/integration: match context canceled on client close
2017-08-01 14:53:31 -07:00
Gyu-Ho Lee b89ef7e295 clientv3/integration: match context canceled on client close
Fix https://github.com/coreos/etcd/issues/8329.

Different behavior from https://github.com/grpc/grpc-go/pull/1369,
in grpc-go transportMonitor.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-01 13:25:13 -07:00
Anthony Romano 7de417d745 clientv3/integration: use grpc metadata to create unique watch ctxs 2017-08-01 13:14:31 -07:00
Anthony Romano fdba9e5fb1 clientv3/integration: test Put succeeds following SetEndpoint
Still gets transport closing errors, but no unavailable endpoint errors.
2017-08-01 12:59:37 -07:00
Anthony Romano 8385c6682a clientv3/integration: test client puts at most once on bad connection 2017-08-01 10:31:13 -07:00
Anthony Romano ebcfdd1a3d integration: check Canceled is true in compacted watch response 2017-07-25 12:36:01 -07:00
Anthony Romano 755270fa6a integration: sync lapi server after puts in TestLeaseTimeToLive
Linearized read to ensure the keys have committed.
2017-07-13 14:55:43 -07:00
Gyu-Ho Lee 581a83dfd9 clientv3/*: add 'MoveLeader' method to 'Maintenance'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-06-23 13:07:17 -07:00
Anthony Romano 9e574afb84 clientv3/integration: wait for leader before trying to count watches
Fixes #8044
2017-06-22 15:02:41 -07:00
Anthony Romano f400010028 clientv3/integration: test clientv3 nested txns 2017-06-21 14:33:15 -07:00
Anthony Romano 8f34d0c8b6 clientv3/integration: test compare on range 2017-06-16 12:13:27 -07:00
Anthony Romano 1b48d6e5df clientv3/integration: test dialing to TLS without a TLS config times out
etcdctl was getting ctx errors from timing out trying to issue RPCs to
a TLS endpoint but without using TLS for transmission. Client should
immediately bail out with a time out error.
2017-05-31 15:51:03 -07:00
fanmin shi e9f464debc integration: creation of cluster now takes maxTxnOps 2017-05-24 14:48:44 -07:00
fanmin shi ae7ddfb483 etcdserver: add --max-txn-ops flag
--max-txn-ops allows users to define the maximum transaction operations
for each txn request. it defaults at 128.

Fixes #7826
2017-05-24 10:32:32 -07:00
Anthony Romano f6d0dda187 clientv3/integration: drain keepalives before waiting for leader loss
500ms keepalive delay on proxy side causes client to sometimes send
a second keepalive since it waits more than 500ms for the first response.

Fixes #7658
2017-05-03 13:22:45 -07:00
Anthony Romano 6dd8fb6f24 Revert "Merge pull request #7732 from heyitsanthony/lease-err-ka"
This reverts commit fbbc4a4979, reversing
changes made to f254e38385.

Fixes #7851
2017-05-02 09:36:16 -07:00
Gyu-Ho Lee f674a1b583 clientv3/integration: test client dial with expired certs
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-26 12:32:46 -07:00
Anthony Romano f3053265ae clientv3/integration: use new interfaces in lease tests 2017-04-24 23:49:44 -07:00
Anthony Romano ec470944f8 clientv3/integration: test watch resume with disconnect before first event 2017-04-21 20:22:51 -07:00
Anthony Romano c654370d6d clientv3/integration: sleep less in TestLeaseRenewLostQuorum
Server Stop+Restart sometimes takes more than 500ms, so with a
one second window the lease client may not get a chance to issue
a keepalive and get a lease extension before the lease client
timer elapses. Instead, sleep for a shorter period of time (while
still guaranteeing a keepalive resend during quorum loss) and
skip the test if server restart takes longer than the lease TTL.

Fixes #7346
2017-04-18 19:35:20 -07:00
Anthony Romano 8fdf8f752b Merge pull request #7752 from heyitsanthony/clientv3-fetch-keyspace-pfx
clientv3: translate WithPrefix() into WithFromKey() for empty key
2017-04-18 09:24:53 -07:00
Gyu-Ho Lee 81291b23b1 clientv3/integration: add 'TestUserErrorAuth'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-17 17:11:37 -07:00
Anthony Romano f0143916de clientv3/integration: test fetching entire keyspace 2017-04-16 20:47:18 -07:00
Anthony Romano 2951e7f6e4 Merge pull request #7733 from heyitsanthony/fix-client-foreign-dial
clientv3: let client dial endpoints not in the balancer
2017-04-14 10:45:17 -07:00
Gyu-Ho Lee 6c2fb5105d clientv3/integration: use 'transport.IsClosedConnError'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-13 11:55:23 -07:00
Anthony Romano 46971fa1db integration: test client can dial endpoints not in balancer 2017-04-12 20:07:04 -07:00
Gyu-Ho Lee 369d561350 clientv3/integration: fix minor typo in Fatalf
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-06 18:26:42 -07:00
Anthony Romano 7db7744737 clientv3/integration: test lease WithRequireLeader 2017-03-30 20:18:33 -07:00
Anthony Romano 66d147766f clientv3/integration: simple namespace wrapper tests 2017-03-22 16:45:38 -07:00
fanmin shi a23609efe6 clientv3: update eps if pinAddr is not included in updateAddrs
FIXES #7392
2017-03-15 11:03:25 -07:00
Anthony Romano c3a678be75 integration: permit background watch streams in TestWatchCancelOnServer
Fixes #7272
2017-02-22 09:54:08 -08:00
Anthony Romano 12d3e4e473 integration: test keepalives for short TTLs 2017-02-21 13:15:45 -08:00
Anthony Romano 51435df179 integration: test RejectOldCluster 2017-02-16 21:33:14 -08:00
Anthony Romano a4a8393cb7 integration: wait five elections before creating watch for require leader test
Otherwise new watch will race with the leader watcher receiving the loss event.
2017-02-15 00:16:25 -08:00
fanmin shi bcfbb096e2 clientv3/integration: test lease not found on TimeToLive() 2017-02-10 16:41:47 -08:00
fanmin shi 366e689eae clientv3: uses direct client calls in integration tests
clientv3 integration test was using clientv3.NewKV, clientv3.NewWatcher, etc to create specific client.
replace those with direct client calls so that the direct calls can also test grpc proxy.
2017-02-07 11:09:19 -08:00
fanmin shi c182428e52 clientv3/integration: stop member before keepalive in TestLeaseKeepAliveInitTimeout 2017-02-07 10:07:03 -08:00
Anthony Romano 8c43bd06a0 clientv3: add DialOptions to config
Removes strict prometheus dependency.

Fixes #7058
2017-02-03 12:00:20 -08:00
fanmin shi 18af48a9dc integration: add test case in dial_test to ensure balancer.updateAddrs works properly 2017-01-26 14:21:29 -08:00
sharat d3191d1afb clientv3: add WithIgnoreLease option 2017-01-25 03:09:30 +05:30
Gyu-Ho Lee d94d22122b clientv3: add 'WithIgnoreValue' option 2017-01-13 15:13:18 -08:00
Anthony Romano 46bd842db9 clientv3/integration: test lease grant/keepalive with/without failures 2016-12-16 10:36:51 -08:00
Denys Smirnov b126e31132 clientv3: better error message for keep alive loop halt 2016-12-15 16:06:27 +02:00
Denys Smirnov 5183ce0118 clientv3: add test for keep alive loop exit case 2016-12-15 03:02:44 +02:00
Anthony Romano fdd89df1eb clientv3/integration: test lease keepalive works following quorum loss 2016-12-06 14:09:57 -08:00
Gyu-Ho Lee a93d8dfe62 Merge pull request #6821 from gyuho/manual
*: fix minor typos, styles
2016-11-08 15:39:26 -08:00
Gyu-Ho Lee 2955d58776
clientv3/integration: fix minor typos, consistent formatting 2016-11-08 12:37:33 -08:00
Anthony Romano 7b5e5eadb1 integration: test canceling a watcher on disconnected stream 2016-11-08 12:02:17 -08:00
sinsharat 13acad85b3 clientv3: added test for client metrics 2016-11-03 00:38:29 +05:30
Gyu-Ho Lee 0684d8c4c6 clientv3/integration: close active connection to get ErrClientConnClosing
because clientv3.Close won't trigger it any more

clientv3.Close just closes watch client
instead of closing grpc connection
2016-11-01 11:13:33 -07:00
Anthony Romano d8ea9d22b6 integration: put key on watch target member for TestWatchWithRequireLeader
It's possible the put will not propagate to all members before removing quorum,
causing watches on the key to wait forever.

Fixes #6386
2016-10-28 13:12:26 -04:00
Gyu-Ho Lee 0a3d45a307 clientv3: send create event over outc 2016-10-27 11:11:16 -07:00
Anthony Romano 8f3abda5b8 integration: account for unsynced server in TestWatchResumeCompacted
The watch's etcd server is shutdown to keep the watch in a retry state as
keys are put and compacted on the cluster. When the server restarts,
there is a window where the compact hasn't been applied which may cause
the watch to receive all events instead of only a compaction error.

Fixes #6535
2016-10-21 13:42:10 -07:00
Anthony Romano a66c25121b integration: stress closing while resuming watchers 2016-10-20 15:33:11 -07:00
Gyu-Ho Lee 4de2128344 clientv3/integration: test missing sort order get 2016-10-18 16:29:22 -07:00
Geoff Levand 54c252ee63 clientv3/kv_test: Fix quota test
Updates TestKVPutError.  Change the quota to work with systems
that have a 64 KiB page size. Increase the db sync wait time to
one second.  Also, add some comments for the hard coded value.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-10-05 16:41:06 -07:00
Anthony Romano 8e1c989ec3 integration: test a canceled watch won't return a closing error 2016-10-04 14:47:40 -07:00
Anthony Romano 9ce398f8a6 integration: test canceling watchers when disconnected 2016-10-03 16:56:14 -07:00
Gyu-Ho Lee 29dd3cf5bd Revert "clientv3/integration: add TestDialWithHTTPS"
This reverts commit a96a28d603.
2016-10-03 13:05:08 -07:00
Gyu-Ho Lee a96a28d603 clientv3/integration: add TestDialWithHTTPS 2016-10-03 02:16:07 -07:00
Anthony Romano deef16b376 integration: test client watchers with overlapped context cancels 2016-09-21 09:40:24 -07:00
Anthony Romano 69c7ea0b4a Merge pull request #6473 from heyitsanthony/watchreconn-putretry
integration: l-read before Put in TestWatchReconnRequest
2016-09-19 14:52:26 -07:00
Anthony Romano 0fb2cab221 integration: l-read before Put in TestWatchReconnRequest
TestWatchReconnRequest occasionally triggers elections because it spins on
drop connections, eating up CPU. In case there's an election, submit an
l-read to wait for the cluster to settle down.

Fixes #6314
2016-09-19 14:14:32 -07:00
Gyu-Ho Lee f11b35eb71 clientv3/integration: test 'SetEndpoints' 2016-09-20 04:36:14 +09:00
Gyu-Ho Lee 03b9d6f24c *: separate 'capnslog' log level setting 2016-09-10 20:26:51 +09:00
Gyu-Ho Lee 4c08f6767c clientv3: add lease.TimeToLive + tests 2016-09-09 08:18:45 +09:00
Anthony Romano a50c707050 clientv3/integration: wait for two request timeouts in txn tests
Read only txns and Get may timeout once if the leader is lost.
2016-08-26 10:04:10 -07:00
Xiang Li f2b7c501cc clientv3/integration: fix TestKVPutStoppedServerAndClose 2016-08-24 13:57:27 -07:00
Anthony Romano 46765ad79c clientv3: respect up/down notifications from grpc
Fixes #5842
2016-08-16 09:49:36 -07:00
Anthony Romano 8c1c291332 clientv3/integration: test watcher cancelation propagation to server 2016-08-09 00:10:57 -07:00
Xiang Li 33c3583b50 clientv3: add send created notification 2016-08-02 20:08:11 -07:00
Anthony Romano 4c9a2a65c9 integration: test clientv3 watch filters 2016-07-27 21:25:06 -07:00
Anthony Romano 8c8742f43c integration: change timeouts for TestWatchWithProgressNotify
a) 2 * progress interval was passing with dropped notifies
b) waitResponse was waiting so long that it expected a dropped notify
2016-07-20 13:23:44 -07:00
Xiang Li e177d9eda2 clientv3/integration: fix race in TestWatchCompactRevision 2016-07-19 09:31:44 -07:00
Anthony Romano 27a30768e1 integration: drain keepalives in TestLeaseKeepAliveCloseAfterDisconnectRevoke
Fixes #5900
2016-07-18 19:45:59 -07:00
westhood 16b0c1d1e1 clientv3: fix sync base
It is not correct to use WithPrefix. Range end will change in every
internal batch.
2016-07-07 12:02:53 +08:00
Anthony Romano 1c25aa6c48 clientv3, ctl3, clientv3/integration: add compact response to compact 2016-06-28 09:32:31 -07:00
Xiang Li 6496ae005d clientv3: add withCount support 2016-06-21 21:17:35 -07:00
Anthony Romano 1097d63ff7 clientv3/integration: test WithRequireLeader on Watch 2016-06-20 14:26:16 -07:00
Anthony Romano 78c957df41 Merge pull request #5603 from heyitsanthony/clientv3-close-keepalive
clientv3: close keepalive channel if TTL locally exceeded
2016-06-09 09:44:32 -07:00
Anthony Romano 0554ef9c39 clientv3/integration: tests for closing lease channel 2016-06-09 09:12:59 -07:00
Gyu-Ho Lee 753073198f clientv3/integration: WaitLeader to follower
Fix https://github.com/coreos/etcd/issues/5601.
2016-06-08 16:45:32 -07:00
Anthony Romano 62f8ec25c0 clientv3: use grpc reconnection logic 2016-06-08 01:04:59 -07:00
Xiang Li 83ce1051ff auth: make naming consistent 2016-06-07 10:54:50 -07:00
Gyu-Ho Lee 0cb4dd4331 clientv3/integration: test lease closed connection
Tests if lease operations return ErrConnClosed when
the client is closed.
2016-06-03 16:41:32 -07:00
Anthony Romano 5f5a203e27 clientv3: don't hold client lock while dialing
Causes async reconnect to block while the client is dialing.

This was also causing problems with the Close error message, so
now Close() will return the last dial error (if any) instead of
clearing it out with a cancel().

Fixes #5416
2016-06-03 10:25:20 -07:00
Gyu-Ho Lee 75dc10574a clientv3: watch resp with error when client close 2016-06-01 10:39:48 -07:00
Anthony Romano a83051d0fc clientv3: don't panic on Get if NewKV is created with a closed client 2016-06-01 05:53:21 -07:00
Anthony Romano 1d88130522 clientv3: fix deadlock on Get with concurrent Close 2016-06-01 05:53:21 -07:00
Gyu-Ho Lee 7b5657cf1a clientv3: check if KV.Client is closed
For https://github.com/coreos/etcd/issues/5495.
2016-05-31 12:00:19 -07:00
Anthony Romano e4a2dcad9e clientv3/integration: ignore closing transport in TestKVPutStoppedServerAndClose
The grpc "transport is closing" error is rasied when the host is unreachable;
there's no good way to avoid it for a Put.

Fixes #5343
2016-05-18 14:49:39 -07:00
Hitoshi Mitake 6259318521 *: attach auth token as a gRPC credential
This commit adds a functionality of attaching an auth token to gRPC
connection as a per RPC credential.

For doing this, this commit lets clientv3.Client.Dial() create a
dedicated gRPC connection for doing authentication. With the dedicated
connection, the client calls Authenticate() RPC and obtain its
token. The token is attached to the main gRPC connection with
grpc.WithPerRPCCredentials().

This commit also adds a new option --username to etcdctl (v3). With
this option, etcdctl attaches its auth token to the main gRPC
connection (currently it is not used at all).
2016-05-17 13:26:12 +09:00
Xiang Li c7c0e1eb7a integration: remove parallel testing
We cannot do testing in parallel since leak testing will detect the goroutines
in other tests running in parallel.
2016-05-13 12:01:25 -07:00
Gyu-Ho Lee fd9e07a529 clientv3: update LICENSE header 2016-05-12 20:50:58 -07:00
Gyu-Ho Lee 68eaf4083a clientv3: WithRequireLeader 2016-05-12 19:25:42 -07:00
Anthony Romano 527aa1a499 clientv3: fix Close after failed Put
Was crashing on a nil connection. Reworked the shutdown path a little so
there's only one connection close site.
2016-05-12 16:16:27 -07:00
Anthony Romano 8b52fd0d2d clientv3: gracefully handle watcher resume on compacted revision
Fixes #5239
2016-05-03 09:30:53 -07:00