frp/test/e2e
fatedier c7ac12ea0f
server/group: refactor with shared abstractions and fix concurrency issues (#5222)
* server/group: refactor group package with shared abstractions and fix concurrency issues

Extract common patterns into reusable components:
- groupRegistry[G]: generic concurrent map for group lifecycle management
- baseGroup: shared plumbing for listener-based groups (TCP, HTTPS, TCPMux)
- Listener: unified virtual listener replacing 3 identical implementations

Fix concurrency issues:
- Stale-pointer race: isCurrent check + errGroupStale + controller retry loops
- Worker generation safety: pass realLn and acceptCh as params instead of reading mutable fields
- Connection leak: close conn on worker panic recovery path
- ABBA deadlock in HTTP UnRegister: consistent lock ordering (group.mu -> registry.mu)
- Round-robin overflow in HTTPGroup: use unsigned modulo

Add unit tests (17 tests) for registry, listener, and baseGroup.
Add TCPMux group load balancing e2e test.

* server/group: replace tautological assertion with require.NotPanics

* server/group: remove blank line between doc comment and type declaration
2026-03-08 18:57:21 +08:00
..
framework refactor: use maps.Clone and slices.Concat (#5220) 2026-03-08 10:38:16 +08:00
legacy refactor: fix modernize lint issues (#5215) 2026-03-07 23:10:19 +08:00
mock/server lint by golangci-lint (#3080) 2022-08-29 01:02:53 +08:00
pkg refactor: fix modernize lint issues (#5215) 2026-03-07 23:10:19 +08:00
v1 server/group: refactor with shared abstractions and fix concurrency issues (#5222) 2026-03-08 18:57:21 +08:00
e2e.go vnet: fix issues (#4771) 2025-04-27 15:46:22 +08:00
e2e_test.go use new log package (#4054) 2024-03-12 13:58:53 +08:00
examples.go add e2e tests for v1 config (#3608) 2023-09-13 16:32:39 +08:00
suites.go frpc: consider include configs for verify and reload command (#2424) 2021-06-02 23:54:22 +08:00