mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
parent
28e347002a
commit
ecc6476308
@ -5,7 +5,6 @@ import (
|
||||
"io"
|
||||
"testing"
|
||||
"testing/quick"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestHeaderFunctions(t *testing.T) {
|
||||
@ -173,13 +172,7 @@ func TestClose(t *testing.T) {
|
||||
c0 := NewConnection("c0", ar, bw, m0).(wireFormatConnection).next.(*rawConnection)
|
||||
NewConnection("c1", br, aw, m1)
|
||||
|
||||
c0.close <- nil
|
||||
|
||||
select {
|
||||
case <-c0.closed:
|
||||
case <-time.After(1 * time.Second):
|
||||
t.Fatal("Did not close within a second")
|
||||
}
|
||||
c0.close(nil)
|
||||
|
||||
if !c0.isClosed() {
|
||||
t.Fatal("Connection should be closed")
|
||||
|
Loading…
Reference in New Issue
Block a user