18 Commits

Author SHA1 Message Date
Marek Siarkowicz
cadfc407e9 Remove limit from read requests after a failed write
Limit can cause multiple request due to pagination.
For reads after a failed write we would like to return to normal write
request as soon as possible.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2024-04-12 15:01:17 +02:00
Ivan Valdes
0976398964
tests/robustness: address golangci var-naming issues
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-03-25 16:27:05 -07:00
Madhav Jivrajani
0b27570368 tests/robustness: use WithRequireLeader in Kubernetes traffic
Kubernetes uses WithRequireLeader to modify the context passed
to the Watch() and RequestProgress() calls in order to ensure
that a leader is present in the cluster before serving the request.

This commit mimics that behaviour in the Kubernetes traffic.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2024-02-22 15:01:33 +05:30
Madhav Jivrajani
9aad6700d5 tests/robustness: add robustness test for watch with PrevKV()
Kubernetes relies on the PrevKV() option in the watches it opens
against etcd. This commit adds a robustness test to validate the
same.

A watch response returned with PrevKV() is valid if:
The value in current event's prevKV matches the previous
event's value of the same key if this is not a create event.

There are cases where there can be a prevKV for a create event
as well, for example if a watch is opened after the key is creatd.
Since we don't simulate for that, we don't check for that.

Further, this adjusts revision numbers such that we can successfully create
a new replay. Needed now since we will have unit tests with
and without PrevKV co-existing and we requite creation of a
new replay everytime we validate PrevKV.

We also regenerate test data with so that prevKV exists in it

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2024-02-13 22:55:57 +05:30
Jongwoo Han
08d799c4cc
Correct typo from 'Kuberntes' to 'Kubernetes'
Signed-off-by: Jongwoo Han <jongwooo.han@gmail.com>
2023-12-20 18:09:31 +09:00
Wei Fu
07effc4d0a *: fix revive linter
Remove old revive_pass in the bash scripts and migirate the revive.toml
into golangci linter_settings.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-24 14:21:11 +08:00
Marek Siarkowicz
eb32d9cccc tests: Add support for lazyfs
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-07-27 13:42:38 +02:00
Marek Siarkowicz
8fca6ebdb2 tests/robustness: Prevent to many concurrent non-unique writes which are causing linearization to timeout
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-07-03 14:39:23 +02:00
Marek Siarkowicz
c3720fac3d tests/robustness: Implement Kubernetes pagination
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-23 09:44:22 +02:00
Marek Siarkowicz
519617cfd0 tests/robustness: Tune Kubernetes tests to reduce number of delete requests
Having too many delete requests is bad as they are not unique requests, so
linearization is more prone to timeout on them.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-20 09:45:23 +02:00
Marek Siarkowicz
96987d8b5e tests/robustness: Implement stale reads without validation
For now we just validate stale read revision, but not response content.
Reason is that etcd model only stores latest version of keys, and no
history like real etcd.

Validating stale read contents needs to be done outside of model
as storing whole history is just to costly for linearization validation.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-16 21:17:37 +02:00
Marek Siarkowicz
16bf0f6641 tests/robustness: Use traffic.RecordingClient in watch
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-25 22:17:23 +02:00
Marek Siarkowicz
4872b679a5 tests/robustness: Expect revions to be unique for Kubernetes Traffic
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-23 15:51:10 +02:00
Marek Siarkowicz
6429f47631 tests/robustness: Validate all etcd watches opened to etcd
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-16 10:28:01 +02:00
Marek Siarkowicz
6e53792568 tests/robustness: Implement Kubernetes optimistic concurrency operations
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-15 13:45:27 +02:00
Marek Siarkowicz
911c40a347 tests/robustness: Implement kubernetes list watch protocol
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-15 10:11:05 +02:00
Marek Siarkowicz
e9900f6fff tests/robustness: Separate stream id from client id and improve AppendableHistory doc
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-11 21:03:52 +02:00
Marek Siarkowicz
ad20230e07 test/robustness: Create dedicated traffic package
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-09 10:50:13 +02:00