Replace "only" with "xudpConcurrency" in Mux config

This commit is contained in:
RPRX 2023-04-10 10:36:07 +08:00 committed by GitHub
parent 29d7865d78
commit 24a2be43ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 112 additions and 90 deletions

View file

@ -345,13 +345,16 @@ func TestMuxConfig_Build(t *testing.T) {
}},
{"empty def", `{}`, &proxyman.MultiplexingConfig{
Enabled: false,
Concurrency: 8,
Concurrency: 0,
}},
{"not enable", `{"enabled": false, "concurrency": 4}`, &proxyman.MultiplexingConfig{
Enabled: false,
Concurrency: 4,
}},
{"forbidden", `{"enabled": false, "concurrency": -1}`, nil},
{"forbidden", `{"enabled": false, "concurrency": -1}`, &proxyman.MultiplexingConfig{
Enabled: false,
Concurrency: -1,
}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {