MCPcopy Create free account
hub / github.com/PostHog/duckgres / TestReadStartupMessageMaxLengthAccepted

Function TestReadStartupMessageMaxLengthAccepted

server/wire/protocol_test.go:97–105  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

95 name string
96 length int32
97 }{
98 {"negative", -1},
99 {"most_negative", -2147483648},
100 {"zero", 0},
101 {"below_length_field", 3},
102 {"length_only_no_version", 4}, // would slice remaining[:4] out of range
103 {"partial_version", 7},
104 {"just_over_cap", maxStartupMessageLength + 1},
105 {"absurdly_large", 2147483647}, // would allocate ~2GiB
106 }
107 for _, tc := range cases {
108 t.Run(tc.name, func(t *testing.T) {

Callers

nothing calls this directly

Calls 2

buildRawStartupFunction · 0.85
ReadStartupMessageFunction · 0.70

Tested by

no test coverage detected