14 Commits

Author SHA1 Message Date
Wei Fu
ac95dd7391 *: fix GracefulStop issue when using cmux for TLS
The gRPC server supports to use GracefulStop to drain all the inflight RPCs,
including streaming RPCs.

When we use non-cmux mode to start gRPC server (non-TLS or
TLS+gRPC-only), we always invoke GracefulStop to drain requests.

For cmux mode (gRPC.ServeHTTP), since the connection is maintained by http
server, gRPC server is unable to send GOAWAY control frame to client.
So, it's always force close all the connections and doesn't drain
requests by default.

In gRPC v1.61.0 version, it introduces new experimental feature
`WaitForHandlers` to block gRPC.Stop() until all the RPCs finish. This patch
is to use `WaitForHandlers` for cmux mode's graceful shutdown.

This patch also introduces `v3rpcBeforeSnapshot` failpoint. That's used
to verify cmux mode's graceful shutdown behaviour.

For TestAuthGracefulDisable (tests/common) case, increased timeout from
10s to 15s because we try to graceful shutdown after connection closed
and it takes more time than before.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-04-15 15:42:02 +08:00
Ivan Valdes
aeecfa00b4
tests/common: address golangci var-naming issues
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-03-20 22:24:52 -07:00
Wei Fu
aa97484166 *: enable goimports in verify-lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 21:14:09 +08:00
Chao Chen
c846b087db migrate e2e auth tests to common #8
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-05-12 22:51:47 -07: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
Chao Chen
9a2553fe2f migrate auth tests to common #7
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-27 19:30:41 -07:00
Chao Chen
c002e096b5 migration auth tests to common #5
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-03 12:26:36 -08:00
Chao Chen
d798816baf migrate auth tests to common #6
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-02-28 10:32:29 -08:00
Chao Chen
b93745a862 migrate to auth test #4
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-02-23 10:46:31 -08:00
Chao Chen
c36ea3fdcf migrate auto tests to common #3
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-02-15 11:08:01 -08:00
Marek Siarkowicz
e73f55d4e9
Merge pull request #15028 from chaochn47/auth_test_split
tests/common: migrate auth tests #2
2023-01-01 18:58:39 +01:00
Piotr Tabor
9abc895122 Goimports: Apply automated fixing to test files as well.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-29 13:04:45 +01:00
Chao Chen
a7da508ff6 tests/common: migrate auth tests #1
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-12-19 22:23:11 -08:00
Chao Chen
008df94901 tests/common: migrate auth tests #1
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-12-15 10:49:20 -08:00