239 Commits

Author SHA1 Message Date
John Jiang
51a22c21ff tests: cleanup unnecessary assignment in cluster.go
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-07-19 21:58:33 +08:00
caojiamingalan
eff9517a90 etcdserver: add cluster id check for hashKVHandler
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-07-05 14:09:40 -05:00
Benjamin Wang
c6fd719ccf
Merge pull request #16029 from dusk125/revision-bump
Adding optional revision bump to snapshot restore
2023-07-03 07:01:53 +01:00
Allen Ray
be3e851264 Adding optional revision bump and mark compacted to snapshot restore
Signed-off-by: Allen Ray <alray@redhat.com>
2023-06-27 09:26:25 -04:00
Benjamin Wang
9f351b3ec6
Merge pull request #16127 from chaochn47/runtime-reconfig-tests
add runtime reconfiguration tests
2023-06-27 09:56:56 +01:00
Chao Chen
8e161b68f3 add runtime reconfiguration tests
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-06-26 09:09:39 -07:00
Wei Fu
b3316c0e09 *: should return exitCode even if cmd isn't nil
For the pkg/expect package, if the process has been stopped but there is
no `Close()` call, the `ExitCode()` won't return exit code correctly.
The `ExitCode()` should check `exitErr` and return exit code if cmd isn't nil.

And introduces `exitCode` to return correct exit code based on the
process is signaled or exited.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-25 10:39:34 +08:00
Chao Chen
6d79b86219 Enable failpoint by default in integration tests
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-06-21 23:13:46 -07:00
Benjamin Wang
20c4247d2c
Merge pull request #16037 from chaochn47/uds_e2e_test
add uds test cases into e2e TestAuthority
2023-06-12 14:45:59 +08:00
Chao Chen
e6c8bf82e0 add uds test cases into e2e TestAuthority
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-06-08 15:54:30 -07:00
caojiamingalan
b9e30bf878 etcdserver: add e2e test to reproduce the incorrect hash issue when resuming scheduled compaction.
check ScheduledCompactKeyName and FinishedCompactKeyName
before writing hash to hashstore. If they do not match, then it means this compaction has once been interrupted and its hash value is invalid. In such cases, we won't write the hash values to the hashstore, and avoids the incorrect corruption alarm.

Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-06-07 19:54:09 -05:00
Wei Fu
50aa00b203 tests: make log monitor as common helper
It's followup of #15667.

This patch is to use zaptest/observer as base to provide a similar
function to pkg/expect.Expect.

The test env

```bash
11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
mkdir /sys/fs/cgroup/etcd-followup-15667
echo 0-2 | tee /sys/fs/cgroup/etcd-followup-15667/cpuset.cpus # three cores
```

Before change:

* memory.peak: ~ 681 MiB
* Elapsed (wall clock) time (h:mm:ss or m:ss): 6:14.04

After change:

* memory.peak: ~ 671 MiB
* Elapsed (wall clock) time (h:mm:ss or m:ss): 6:13.07

Based on the test result, I think it's safe to be enabled by default.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-18 09:00:24 +08:00
Chao Chen
941c4afb0c tests/framwork/e2e/cluster.go: revert back to sequential cluster stop to reduce e2e test run time
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-04-11 22:08:18 -07:00
Marek Siarkowicz
a5a5862e0b tests: Make using etcdctl expicit in e2e tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-06 13:29:37 +02:00
Marek Siarkowicz
2d9aeec91f
Merge pull request #15645 from serathius/tests-cleanup-alternative-binaries
tests/framework: Cleanup alternative binaries in e2e tests
2023-04-06 07:33:17 +02:00
Marek Siarkowicz
540d012e5e tests/robustness: Ensure that etcdctl binary is provided
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-05 23:04:20 +02:00
Marek Siarkowicz
651873cf7b tests/framework: Cleanup alternative binaries in e2e tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-05 15:32:31 +02:00
Marek Siarkowicz
138fae6246
Merge pull request #15632 from serathius/fix-comparing-etcd-version
tests: Fix comparing etcd version
2023-04-04 09:34:55 +02:00
Marek Siarkowicz
8b6bf90c0d
Merge pull request #15580 from chaochn47/fix_flaking_auth_member_remove_test
fix flaking auth member remove test
2023-04-04 09:34:16 +02:00
Chao Chen
caed563e08 fix flaking auth member remove test
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-04-03 17:41:08 -07:00
Marek Siarkowicz
69afcd1960 tests: Fix comparing etcd version
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-03 21:13:36 +02:00
Marek Siarkowicz
0cbd56e8b6 tests: Cleanup endpoints
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-03 12:18:54 +02:00
Marek Siarkowicz
029315f57e tests/robustness: Support running snapshot tests on older versions
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-03 10:43:06 +02:00
Marek Siarkowicz
71ba0873e3 tests/robustness: Encrypt peer traffic to prevent proxy manipulating packets
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-01 16:31:53 +02:00
Marek Siarkowicz
e11a32366e
Merge pull request #15544 from jmhbnz/remove_e2e_calc
Remove e2e from coverage calculation
2023-03-30 16:26:36 +02:00
James Blair
870d478844
Merge e2e spawn files.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-30 22:38:00 +13:00
Marek Siarkowicz
65add8cec4 tests: Test separate http port connection multiplexing
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:49:45 +02:00
Marek Siarkowicz
bf12179a5a server: Add --listen-client-http-urls flag to allow running grpc server separate from http server
Difference in load configuration for watch delay tests show how huge the
impact is. Even with random write scheduler grpc under http
server can only handle 500 KB with 2 seconds delay. On the other hand,
separate grpc server easily hits 10, 100 or even 1000 MB within 100 miliseconds.

Priority write scheduler that was used in most previous releases
is far worse than random one.

Tests configured to only 5 MB to avoid flakes and taking too long to fill
etcd.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:49:45 +02:00
James Blair
1b125300bb
Remove nocov implementation for e2e spawn.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-30 15:17:53 +13:00
Benjamin Wang
f9bdd8c96c
Merge pull request #15502 from chaochn47/deflake_TestMemberList
deflake member_test: enable pre-vote by default and add retry
2023-03-18 07:55:02 +08:00
Chao Chen
d7f992c351 enable pre-vote by default and add retry on member_test
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-17 15:15:13 -07:00
Marek Siarkowicz
cbf819740e tests: Allow specifying http version in curl
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-15 09:27:51 +01:00
Marek Siarkowicz
e87abf3f13 tests: Refactor CURLPrefixArgs
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-14 16:35:43 +01:00
Marek Siarkowicz
67e3c784ba tests: Remove MetricsURLScheme field
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-14 16:35:43 +01:00
James Blair
275e10bcf7
Return default snapshot count to 10,000.
The huge (100k+) value was justified when storev2 was being dumped completely with every snapshot.

With storev2 being decomissioned we can checkpoint more frequently for faster recovery.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-06 20:21:03 +13:00
Benjamin Wang
1f0d361848 clientv3: support serializable MemberList operation
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-25 07:23:39 +08:00
WangXiaoxiao
8e56e2f5ce add mix version for snapshot e2e case
Signed-off-by: WangXiaoxiao <1141195807@qq.com>
2023-02-18 18:01:48 +08:00
Marek Siarkowicz
39d98522d6 tests: Enable progress notify in linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-09 07:32:54 +08:00
Wei Fu
fa527c5e54 tests: support to stop the multiple members concurrently
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-02-03 22:23:06 +08:00
Marek Siarkowicz
2fcb05710d tests: Move stopping proxy to after process stop to speed up cluster shutdown
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-12 15:17:34 +01:00
Marek Siarkowicz
deb4291485 tests: Trigger only failpoints available in binary
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-09 17:29:38 +01:00
Marek Siarkowicz
acf3782c20
Merge pull request #15048 from serathius/linearizability-network
tests: Implement network delay and blackholing in linearizability tests
2023-01-09 14:51:54 +01:00
Marek Siarkowicz
064fad5ae4 tests: Implement network delay and blackholing in linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-09 14:18:07 +01:00
Chao Chen
2c46b2b299 externalize snapshot catchup entries to etcd flag
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-01-04 19:01:07 -08:00
Piotr Tabor
6f899a7b40
Merge pull request #15052 from ptabor/20221228-goimports-fix
./scripts/fix.sh: Takes care of goimports across the whole project.
2022-12-29 11:31:22 +01:00
Piotr Tabor
cf22f60e8b
Merge pull request #15053 from wafuwafu13/show-as-learner
enhancement(ctlv3): display `as learner` when member add as learner
2022-12-29 09:44:26 +01:00
Piotr Tabor
9e1abbab6e Fix goimports in all existing files. Execution of ./scripts/fix.sh
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-29 09:41:31 +01:00
Wei Fu
4d0b91947e chore: delete // +build buildtag by go fix
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-29 14:17:05 +08:00
wafuwafu13
0c67e318d7 enhancement(ctlv3): display as learner when member add as learner
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2022-12-29 13:18:23 +09:00
Wei Fu
a438794abb e2e: deflake TestCtlV3AuthGracefulDisable
We should call Wait for grpc-proxy process stop before start. Otherwise,
the tcp port won't be released.

Fixes: #14926

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-16 13:33:02 +08:00