Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add existing http health check handler e2e test #16698

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

chaochn47
Copy link
Member

tests/e2e/http_health_check_test.go Outdated Show resolved Hide resolved
server/etcdserver/server.go Outdated Show resolved Hide resolved
tests/e2e/http_health_check_test.go Outdated Show resolved Hide resolved
tests/e2e/http_health_check_test.go Outdated Show resolved Hide resolved
tests/e2e/http_health_check_test.go Show resolved Hide resolved
tests/e2e/http_health_check_test.go Outdated Show resolved Hide resolved
// verify that auth enabled serializable read must go through mvcc
// this test case is skipped until https://github.com/etcd-io/etcd/pull/16697 is merged.
{
name: "slow buffer write back with auth enabled",
Copy link
Member Author

@chaochn47 chaochn47 Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will block opening backend read tx hence serializable check failed.

To simulate real world failure scenario, we need

  1. write a key value
  2. backendBatchLimit set to 0
  3. inject beforeCommit
  4. serializable check an existing key to use boltdb tx.

The no. 4th requirement is not ready yet. Hence use the beforeWritebackBuf sleep to simulate stalled disk write.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a TODO left in code.

@chaochn47
Copy link
Member Author

chaochn47 commented Oct 12, 2023

Ping @ahrtr @serathius, other than the last skipped test case, I think the others should be good to go.

@chaochn47 chaochn47 force-pushed the health_check_e2e_test branch 2 times, most recently from 94b9348 to f2e747f Compare October 12, 2023 23:58
@chaochn47
Copy link
Member Author

Ping @serathius @ahrtr

/cc @siyuanfoundation since failure injections should be re-usable.

@chaochn47
Copy link
Member Author

chaochn47 commented Oct 18, 2023

ping @ahrtr @serathius if this PR is good to merge.

@siyuanfoundation and I are working on adding individual checks and test function in this PR can be re-used.

@chaochn47 chaochn47 force-pushed the health_check_e2e_test branch 2 times, most recently from 072707a to 125910d Compare October 18, 2023 19:40
Signed-off-by: Chao Chen <chaochn@amazon.com>
Comment on lines +424 to +427
if cfg.GoFailEnabled && !proc.Failpoints().Enabled() {
epc.Close()
t.Skip("please run 'make gofail-enable && make build' before running the test")
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. It's much better now. Each use case doesn't need to bother to do this check.

Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ahrtr ahrtr merged commit 44ce4f9 into etcd-io:main Oct 19, 2023
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants