1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

fix encoding test

This commit is contained in:
Darien Raymond 2018-02-08 16:13:27 +01:00
parent 9a46cf37fb
commit 5755d4153a
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -1,7 +1,6 @@
package encoding_test
import (
"context"
"testing"
"v2ray.com/core/common"
@ -45,8 +44,8 @@ func TestRequestSerialization(t *testing.T) {
buffer2 := buf.New()
buffer2.Append(buffer.Bytes())
ctx, cancel := context.WithCancel(context.Background())
sessionHistory := NewSessionHistory()
defer common.Close(sessionHistory)
userValidator := vmess.NewTimedUserValidator(protocol.DefaultIDHash)
userValidator.Add(user)
@ -66,6 +65,4 @@ func TestRequestSerialization(t *testing.T) {
_, err = server.DecodeRequestHeader(buffer2)
// anti replay attack
assert(err, IsNotNil)
cancel()
}