Commit Graph

54 Commits

Author SHA1 Message Date
7de417d745 clientv3/integration: use grpc metadata to create unique watch ctxs 2017-08-01 13:14:31 -07:00
ebcfdd1a3d integration: check Canceled is true in compacted watch response 2017-07-25 12:36:01 -07:00
9e574afb84 clientv3/integration: wait for leader before trying to count watches
Fixes #8044
2017-06-22 15:02:41 -07:00
ec470944f8 clientv3/integration: test watch resume with disconnect before first event 2017-04-21 20:22:51 -07:00
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
c3a678be75 integration: permit background watch streams in TestWatchCancelOnServer
Fixes #7272
2017-02-22 09:54:08 -08:00
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
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
7b5e5eadb1 integration: test canceling a watcher on disconnected stream 2016-11-08 12:02:17 -08:00
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
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
0a3d45a307 clientv3: send create event over outc 2016-10-27 11:11:16 -07:00
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
a66c25121b integration: stress closing while resuming watchers 2016-10-20 15:33:11 -07:00
8e1c989ec3 integration: test a canceled watch won't return a closing error 2016-10-04 14:47:40 -07:00
9ce398f8a6 integration: test canceling watchers when disconnected 2016-10-03 16:56:14 -07:00
deef16b376 integration: test client watchers with overlapped context cancels 2016-09-21 09:40:24 -07:00
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
8c1c291332 clientv3/integration: test watcher cancelation propagation to server 2016-08-09 00:10:57 -07:00
33c3583b50 clientv3: add send created notification 2016-08-02 20:08:11 -07:00
4c9a2a65c9 integration: test clientv3 watch filters 2016-07-27 21:25:06 -07:00
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
e177d9eda2 clientv3/integration: fix race in TestWatchCompactRevision 2016-07-19 09:31:44 -07:00
1c25aa6c48 clientv3, ctl3, clientv3/integration: add compact response to compact 2016-06-28 09:32:31 -07:00
1097d63ff7 clientv3/integration: test WithRequireLeader on Watch 2016-06-20 14:26:16 -07:00
62f8ec25c0 clientv3: use grpc reconnection logic 2016-06-08 01:04:59 -07:00
75dc10574a clientv3: watch resp with error when client close 2016-06-01 10:39:48 -07:00
fd9e07a529 clientv3: update LICENSE header 2016-05-12 20:50:58 -07:00
8b52fd0d2d clientv3: gracefully handle watcher resume on compacted revision
Fixes #5239
2016-05-03 09:30:53 -07:00
b3ebe66c97 clientv3/integration: tests with new errors 2016-04-29 12:00:26 -07:00
b7ac758969 *: rename storage package to mvcc 2016-04-25 15:25:51 -07:00
da5bd04a1a clientv3: Remove superflous LeaseID casts in integration tests.
The integration tests under clientv3 have superflous LeaseID casts
that are not needed as the ID field of the lease responses are of
type LeaseID now.
2016-04-15 17:48:20 -07:00
a9f1d5dfa6 clientv3/integration: use clientv3 event types
Fix https://github.com/coreos/etcd/issues/5001.
2016-04-07 19:29:32 -07:00
dc17eaace7 *: rename Lease Create to Grant
Creating a lease through the client API interface union looked like
"c.Create(...)"-- the method name wasn't very descriptive.
2016-04-07 12:28:14 -07:00
aa11dafaf8 clientv3: expose event type in user API
- add another layer of abstraction in clientv3 for user, not expose internal storagepb ones
- provide commonly used routines IsCreate(), IsModify() on event
2016-04-07 09:47:04 -07:00
e72591b4a2 clientv3/integration: fix watch range test typo 2016-04-06 21:12:07 -07:00
88306c9fa7 etcdserver, clientv3: let progressReportIntervalMilliseconds be private
progressReportIntervalMilliseconds (old
ProgressReportIntervalMilliseconds) is accessed by multiple goroutines
and it is reported as race.

For avoiding this report, this commit wraps the variable with
functions. They access the variable with atomic operations so the race
won't be reported.
2016-04-05 09:12:17 +09:00
b0cc0e443c *: clean up if, bool comparison 2016-04-02 12:55:11 -07:00
91dc6b29a6 clientv3/integration: fix race when setting progress report interval 2016-03-28 16:08:18 -07:00
bd832e5b0a *: migrate Godeps to vendor/ 2016-03-22 17:10:28 -07:00
44753594ec v3rpc: move errors to v3rpc/rpctypes
Fixes #4771
2016-03-17 11:52:34 -07:00
4eeea5ccda clientv3/integration: remove invalid future revision test
Future revisions are now supported, so test is outdated.
2016-03-07 15:52:34 -08:00
27316196d8 clientv3: add WithProgressNotify
Client side for https://github.com/coreos/etcd/issues/4628.
2016-03-04 09:47:13 -08:00
1e16758029 clientv3: add Err() to WatchResponse
Checking for number of events as a failure condition was a kludge.
2016-03-03 15:21:04 -08:00
eb327c690b clientv3: support watcher ranges 2016-02-29 15:20:41 -08:00
d02b1c982f clientv3: return closed channel on Watch() cancel
was returning nil; difficult to use correctly

Fixes #4626
2016-02-26 12:16:41 -08:00
a78604dacb *: watch true cancel, created for wrong rev
This sets Created and Cancel true in pb.WatchResponse
when it has received wrong start revision instead of
panic. So that clientv3 can set 'Canceled' in WatchResponse
as well.

Fix https://github.com/coreos/etcd/issues/4610.
2016-02-24 20:56:17 -08:00
a24d276891 clientv3: combine Watch, WatchPrefix with variadic
For https://github.com/coreos/etcd/issues/4598.
2016-02-23 20:02:21 -08:00
f66162932c clientv3: fix current watcher reconnection
If a current watcher didn't receive any events, a reconnect cycle would
advance its revision to the store's current revision. Instead, reconnect
using the watcher's creation header revision if the watcher hasn't received
any events.

Fixes #4502
2016-02-18 15:01:57 -08:00
2415303991 clientv3: typedef <-chan WatchResponse to WatchChan 2016-02-12 14:06:59 -08:00