mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Add context to HTTP handlers, attempt to support localhost Broker.
Seems unlikely to work due to dev_appserver single inflight request limitation
This commit is contained in:
parent
4acff9983c
commit
b04d1f67fb
4 changed files with 110 additions and 35 deletions
|
@ -22,6 +22,8 @@ func TestSnowflakeHeap(t *testing.T) {
|
|||
s4.clients = 1
|
||||
|
||||
heap.Push(h, s1)
|
||||
if 1 != h.Len() {
|
||||
}
|
||||
heap.Push(h, s2)
|
||||
heap.Push(h, s3)
|
||||
heap.Push(h, s4)
|
||||
|
@ -36,6 +38,9 @@ func TestSnowflakeHeap(t *testing.T) {
|
|||
}
|
||||
|
||||
r := heap.Pop(h).(*Snowflake)
|
||||
if 2 != h.Len() {
|
||||
t.Error("Unexpected length.")
|
||||
}
|
||||
if r.clients != 3 {
|
||||
t.Error("Unexpected clients: ", r.clients)
|
||||
}
|
||||
|
@ -44,6 +49,9 @@ func TestSnowflakeHeap(t *testing.T) {
|
|||
}
|
||||
|
||||
r = heap.Pop(h).(*Snowflake)
|
||||
if 1 != h.Len() {
|
||||
t.Error("Unexpected length.")
|
||||
}
|
||||
if r.clients != 4 {
|
||||
t.Error("Unexpected clients: ", r.clients)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue