mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-02 11:15:03 +03:00
test(sub): leave the decode-once allocation bound room for the race detector
TestSubscriptionDecodesInboundSettingsOncePerRequest capped a request at 128 MiB, which the race job exceeds on correct code (up to 170 MiB) because the detector inflates allocations. One decode per link costs 489 to 750 MiB without it, so a 256 MiB bound still tells the two apart.
This commit is contained in:
@@ -2118,7 +2118,8 @@ func seedSharedSubIdInbound(t *testing.T, protocol model.Protocol, subId string,
|
|||||||
func TestSubscriptionDecodesInboundSettingsOncePerRequest(t *testing.T) {
|
func TestSubscriptionDecodesInboundSettingsOncePerRequest(t *testing.T) {
|
||||||
const n = 1000
|
const n = 1000
|
||||||
const subId = "shared-sub-id"
|
const subId = "shared-sub-id"
|
||||||
const maxAllocated = 128 << 20
|
// The race detector roughly doubles allocations; one decode per link costs several times this.
|
||||||
|
const maxAllocated = 256 << 20
|
||||||
serverPriv, serverPub := mustWireguardKeypair(t)
|
serverPriv, serverPub := mustWireguardKeypair(t)
|
||||||
clientPriv, _ := mustWireguardKeypair(t)
|
clientPriv, _ := mustWireguardKeypair(t)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user