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

proxy: more tests #4709

Closed
3 of 4 tasks
Tracked by #5123
conradludgate opened this issue Jul 13, 2023 · 2 comments
Closed
3 of 4 tasks
Tracked by #5123

proxy: more tests #4709

conradludgate opened this issue Jul 13, 2023 · 2 comments
Assignees
Labels
c/cloud/proxy Component: cloud: proxy

Comments

@conradludgate
Copy link
Contributor

conradludgate commented Jul 13, 2023

  • rust unit test
  • websocket tests
  • HTTP driver E2E test
  • pingdom-style / periodic e2e tests
@conradludgate conradludgate mentioned this issue Jul 13, 2023
2 tasks
@conradludgate conradludgate changed the title more tests: rust unit test; websocket tests in neon repo; pingdom-style / periodic e2e tests proxy: more tests Jul 13, 2023
@conradludgate conradludgate self-assigned this Jul 13, 2023
@skyzh skyzh self-assigned this Jul 13, 2023
@skyzh
Copy link
Member

skyzh commented Jul 13, 2023

Need some time to investigate how we can actually test something. A quick idea in my mind is to introduce failpoint and add yet another mock API besides current Postgres + control_plane API so that we can test everything purely in Rust.

@vadim2404 vadim2404 added the c/cloud/proxy Component: cloud: proxy label Jul 15, 2023
skyzh added a commit that referenced this issue Jul 24, 2023
Given now we've refactored `connect_to_compute` as a generic, we can
test it with mock backends. In this PR, we mock the error API and
connect_once API to test the retry behavior of `connect_to_compute`. In
the next PR, I'll add mock for credentials so that we can also test
behavior with `wake_compute`.

ref #4709

---------

Signed-off-by: Alex Chi Z <chi@neon.tech>
skyzh added a commit that referenced this issue Jul 28, 2023
## Problem

ref #4721, ref
#4709

## Summary of changes

This PR adds unit tests for wake_compute.

The patch adds a new variant `Test` to auth backends. When
`wake_compute` is called, we will verify if it is the exact operation
sequence we are expecting. The operation sequence now contains 3 more
operations: `Wake`, `WakeRetry`, and `WakeFail`.

The unit tests for proxy connects are now complete and I'll continue
work on WebSocket e2e test in future PRs.

---------

Signed-off-by: Alex Chi Z <chi@neon.tech>
@skyzh
Copy link
Member

skyzh commented Jul 31, 2023

web socket tests are running at https://github.com/neondatabase/neon/actions/workflows/pg_clients.yml daily. For the pingdom test, I would like to track it in #4851 instead, because they are basically the same thing that we run an external service to collect both metrics + check if the service is available. Therefore, I'm going to close this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/cloud/proxy Component: cloud: proxy
Projects
None yet
Development

No branches or pull requests

3 participants