728 Commits

Author SHA1 Message Date
Benjamin Wang
285e44378f bump github.com/stretchr/testify from v1.7.2 to v1.8.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 10:51:32 +08:00
Piotr Tabor
590911dfe3
Merge pull request #14847 from mkumatag/fix_expect
fix TestSignal test
2022-11-25 10:39:25 +01:00
Manjunath Kumatagi
0bc46ec92c
fix TestSignal test
Signed-off-by: Manjunath A Kumatagi <mkumatag@in.ibm.com>
2022-11-25 12:50:02 +05:30
Marek Siarkowicz
f18ac02e0f
Merge pull request #14834 from fuweid/bump-grpc-1.51
bump grpc to v1.51.0 from v1.47.0
2022-11-24 09:07:56 +01:00
Bhargav Ravuri
2feec4fe68 comments: fix comments as per goword in go test files
Comments fixed as per goword in go test files that shell
function go_srcs_in_module lists as per changes on #14827

Helps in #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-23 23:05:42 +05:30
Wei Fu
cf285ea3c7 bump grpc to v1.51.0 from v1.47.0
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-23 22:16:22 +08:00
Sasha Melentyev
2c9c209eb6 all: Changing Printf and friends to Print if there is no formatting
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 22:11:23 +03:00
Sasha Melentyev
855aa4f7a7 all: Use ReplaceAll instead of Replace with -1 pos
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 00:06:09 +03:00
Thomas Jungblut
5b163aa507 Expect exit code enhancement
ExpectProcess and ExpectFunc now take the exit code of the process into
account, not just the matching of the tty output.

This also refactors the many tests that were previously succeeding on
matching an output from a failing cmd execution.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-11-14 11:19:41 +01:00
Marek Siarkowicz
069e26e284 tests: Validate etcd linearizability
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-23 06:41:38 +02:00
SimFG
5702765729 wal: Fix the walWriteBytes metric
Signed-off-by: SimFG <1142838399@qq.com>
2022-09-22 19:23:06 +08:00
Benjamin Wang
dd7d30017c Bump go 1.19: revert the change to pkg/adt/interval_tree.go
Some comments in the file are formatted automatically into ugly style,
because the hierarchical structure is missing. After removing the
leading numbers in the comments, `go fmt` will not format the comments
anymore.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
Benjamin Wang
7f10dccbaf Bump go 1.19: update all the dependencies and go.sum files
1. run ./scripts/fix.sh;
2. cd tools/mod; gofmt -w . & go mod tidy;

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
Benjamin Wang
cd0b1d0c66 Bump go 1.19: upgrade go version to 1.19 in all go.mod files
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
demoManito
a9c3d56508 etcd: remove redundant type conversion
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-20 11:26:02 +08:00
Benjamin Wang
159ed15afc
Merge pull request #14479 from demoManito/fix/declaring-empty-slice
etcd: modify declaring empty slices
2022-09-20 05:22:59 +08:00
demoManito
72cf0cc04a etcd: modify declaring empty slices
declare an empty slice to var s []int replace  s :=[]int{}, https://github.com/golang/go/wiki/CodeReviewComments#declaring-empty-slices

Signed-off-by: demoManito <1430482733@qq.com>
2022-09-16 14:41:14 +08:00
demoManito
a281bb0494 pkg: replace the deprecated Expect with ExpectWithContext in pkg/expect/expect_test.go
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-16 14:39:14 +08:00
Benjamin Wang
b7ba0542f6
Merge pull request #14422 from kkkkun/remove-redundant-code
remove redundant log messsages
2022-09-16 12:18:43 +08:00
kkkkun
c4582aaaee remove redundant log messages
Signed-off-by: kkkkun <scuzk373x@gmail.com>
2022-09-16 11:45:43 +08:00
Marek Siarkowicz
df891e3c2f
Merge pull request #14451 from serathius/clean
Just some cleanup of expect
2022-09-14 09:20:20 +02:00
Marek Siarkowicz
157ee32da4 test: Clean incorrectly used StopSignal field from expect
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-13 15:22:45 +02:00
Benjamin Wang
5a315ef88f add a verification on the pagebytes which must be > 0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-13 16:35:31 +08:00
Marek Siarkowicz
1038c2f45c tests: Extract expect configuration into struct
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-13 09:20:35 +02:00
Marek Siarkowicz
f36a8782f0
Merge pull request #14345 from nic-chen/tests/watch
tests: Migrate watch test to common framework
2022-08-25 13:35:34 +02:00
Benjamin Wang
82bf79d4ce
Merge pull request #14376 from biosvs/fix-expect-package
Fixed infinite loop in ExpectProcess.ExpectFunc
2022-08-25 05:29:30 +08:00
Vitalii Levitskii
71c5360f98 Fixed infinite loop in ExpectProcess.ExpectFunc
Signed-off-by: Vitalii Levitskii <vitalii@uber.com>
2022-08-24 16:46:24 +03:00
nic-chen
f6ed36372b tests: Migrate watch test to common framework
Signed-off-by: nic-chen <chenjunxu6@gmail.com>
2022-08-22 21:55:57 +08:00
Sahdev Zala
192d635da9
Merge pull request #14292 from tjungblu/debug_e2e
Add test name to e2e cluster members
2022-08-20 19:30:44 -04:00
Benjamin Wang
b2726c4da3
Merge pull request #12469 from trawler/client_listen_unix_socket
pkg/types: Support Unix sockets in NewURLS
2022-08-09 06:40:31 +08:00
Thomas Jungblut
51933a7c8b Add test name to e2e cluster members
This should aid in debugging test flakes, especially in tests where the process is restarted very often and thus changes its pid.
Now it's a lot easier to grep for different members, also when different tests fail at the same time.
The test TestDowngradeUpgradeClusterOf3 as mentioned in #13167 is a good example for that.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-08-01 15:57:16 +02:00
Thomas Jungblut
eb59368440 Reduce ExpectFunc polling interval.
Fixes issue 14275, flakes close to timeout like TestKVDelete.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-07-28 14:38:44 +02:00
Benjamin Wang
8b6c8b4c96 add unit test for pkg/flags/Uint32FromFlag in uint32_test.go
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-07 04:52:28 +08:00
Benjamin Wang
1a6fe4dbc6 update the comment for MaxConcurrentStreams to clearly state it's the max value for each client.
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-07 04:51:20 +08:00
Benjamin Wang
d8347ec683 add & refine the uint32Value data type
The golang buildin package `flag` doesn't support `uint32` data
type, so we need to support it via the `flag.Var`.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-06 03:43:46 +08:00
杨金珏
6220174687 support custom grpc.MaxConcurrentStreams
There is no update on the original PR (see below) for more then 2
weeks. So Benjamin(@ahrtr) continues to work on the PR. The first
step is to rebase the PR, because there are lots of conflicts with
the main branch.

The change to go.mod and go.sum reverted, because they are not needed.
The e2e test cases are also reverted, because they are not correct.

```
https://github.com/etcd-io/etcd/pull/14081
```

Signed-off-by: nic-chen <chenjunxu6@gmail.com>
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-06 03:43:46 +08:00
Eval EXEC
e2bff7cfe1
pkg/expect: send SIGTERM to target expect process instead of SIGKILL
Signed-off-by: Eval EXEC <execvy@gmail.com>
2022-06-26 16:39:30 +08:00
Piotr Tabor
e7a84b69c8 Update zap to 1.21.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 10:05:25 +02:00
Piotr Tabor
17c1dcd614 Update grpc to 1.47 and go-cmp to 0.5.8.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 08:57:22 +02:00
SimFG
d83925e357 schedule: Provide logs when the fifo job panic happens
To make the fifo scheduler better debuggability.

Signed-off-by: SimFG <1142838399@qq.com>
2022-06-15 20:58:17 +08:00
Marek Siarkowicz
d58f971895 tests: Use zaptest.NewLogger in places we missed 2022-05-06 12:23:20 +02:00
Vlad Saioc
00ca558167 Fixed goroutine leak on NewServer 2022-04-22 08:57:19 +02:00
ahrtr
0dae4b3b1e rollback the opentelemetry bumpping to recover the pipeline failures 2022-04-14 16:13:28 +08:00
Will Beason
eab1e0c5d5 go.mod: upgrade opentelemetry deps
Downstream users of etcd experience build issues when using dependencies
which require more recent (incompatible) versions of opentelemetry. This
commit upgrades the dependencies so that downstream users stop
experiencing these issues.
2022-04-13 07:14:10 -07:00
Marek Siarkowicz
804fddf921 tests: Use zaptest.NewLogger in tests 2022-04-04 13:03:15 +02:00
Marek Siarkowicz
63346bfead server: Use default logging configuration instead of zap production one
This fixes problem where logs json changes format of timestamp.
2022-04-01 10:23:42 +02:00
Marek Siarkowicz
e5bf23037a tests: Keeps log in expect to allow their analysis 2022-03-31 21:02:36 +02:00
Kay Yan
afecd3139c fix the api dependency in pkg, and update cobra to 1.4.0
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2022-03-25 17:18:56 +08:00
Danielle Lancashire
a045e4bbfc expect_test: Look up binaries from the path
Not all systems include binaries in the same location. On my (NixOS, so
albeit a little weird) system these binaries exist in very different
locations.

This test switches to looking up the paths from the users PATH or skips
the test if they do not exist to improve the `make test` experience on
such systems.
2022-03-17 12:55:08 +00:00
cuishuang
b7824b794b fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>

fix some typos

Signed-off-by: cuishuang <imcusg@gmail.com>
2022-03-07 20:28:53 +08:00