mirror of https://github.com/cbeuw/Cloak
Rename a test set
This commit is contained in:
parent
59f2fe04e3
commit
cfa0a97edf
|
|
@ -29,6 +29,7 @@ func dispatchConnection(conn net.Conn, sta *server.State) {
|
|||
var err error
|
||||
buf := make([]byte, 1500)
|
||||
|
||||
// TODO: potential fingerprint for active probers here
|
||||
conn.SetReadDeadline(time.Now().Add(3 * time.Second))
|
||||
i, err := io.ReadAtLeast(conn, buf, 1)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ func TestRecvNewFrame(t *testing.T) {
|
|||
inOrder := []uint64{5, 6, 7, 8, 9, 10, 11}
|
||||
outOfOrder0 := []uint64{5, 7, 8, 6, 11, 10, 9}
|
||||
outOfOrder1 := []uint64{1, 96, 47, 2, 29, 18, 60, 8, 74, 22, 82, 58, 44, 51, 57, 71, 90, 94, 68, 83, 61, 91, 39, 97, 85, 63, 46, 73, 54, 84, 76, 98, 93, 79, 75, 50, 67, 37, 92, 99, 42, 77, 17, 16, 38, 3, 100, 24, 31, 7, 36, 40, 86, 64, 34, 45, 12, 5, 9, 27, 21, 26, 35, 6, 65, 69, 53, 4, 48, 28, 30, 56, 32, 11, 80, 66, 25, 41, 78, 13, 88, 62, 15, 70, 49, 43, 72, 23, 10, 55, 52, 95, 14, 59, 87, 33, 19, 20, 81, 89}
|
||||
outOfOrderWrap0 := []uint64{1<<32 - 5, 1<<32 + 3, 1 << 32, 1<<32 - 3, 1<<32 - 4, 1<<32 + 2, 1<<32 - 2, 1<<32 - 1, 1<<32 + 1}
|
||||
outOfOrder2 := []uint64{1<<32 - 5, 1<<32 + 3, 1 << 32, 1<<32 - 3, 1<<32 - 4, 1<<32 + 2, 1<<32 - 2, 1<<32 - 1, 1<<32 + 1}
|
||||
|
||||
test := func(set []uint64, ct *testing.T) {
|
||||
sb := NewStreamBuffer()
|
||||
|
|
@ -69,6 +69,6 @@ func TestRecvNewFrame(t *testing.T) {
|
|||
test(outOfOrder1, t)
|
||||
})
|
||||
t.Run("out of order wrap", func(t *testing.T) {
|
||||
test(outOfOrderWrap0, t)
|
||||
test(outOfOrder2, t)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue