@@ -46,8 +46,6 @@ func startTestServer(t *testing.T, pf newPeerHook) *Server {
4646}
4747
4848func TestServerListen (t * testing.T ) {
49- defer testlog (t ).detach ()
50-
5149 // start the test server
5250 connected := make (chan * Peer )
5351 srv := startTestServer (t , func (p * Peer ) {
@@ -78,8 +76,6 @@ func TestServerListen(t *testing.T) {
7876}
7977
8078func TestServerDial (t * testing.T ) {
81- defer testlog (t ).detach ()
82-
8379 // run a one-shot TCP server to handle the connection.
8480 listener , err := net .Listen ("tcp" , "127.0.0.1:0" )
8581 if err != nil {
@@ -126,8 +122,6 @@ func TestServerDial(t *testing.T) {
126122}
127123
128124func TestServerBroadcast (t * testing.T ) {
129- defer testlog (t ).detach ()
130-
131125 var connected sync.WaitGroup
132126 srv := startTestServer (t , func (p * Peer ) {
133127 p .running = matchProtocols ([]Protocol {discard }, []Cap {discard .cap ()}, p .rw )
@@ -172,8 +166,6 @@ func TestServerBroadcast(t *testing.T) {
172166//
173167// It also serves as a light-weight integration test.
174168func TestServerDisconnectAtCap (t * testing.T ) {
175- defer testlog (t ).detach ()
176-
177169 started := make (chan * Peer )
178170 srv := & Server {
179171 ListenAddr : "127.0.0.1:0" ,
@@ -224,8 +216,6 @@ func TestServerDisconnectAtCap(t *testing.T) {
224216
225217// Tests that static peers are (re)connected, and done so even above max peers.
226218func TestServerStaticPeers (t * testing.T ) {
227- defer testlog (t ).detach ()
228-
229219 // Create a test server with limited connection slots
230220 started := make (chan * Peer )
231221 server := & Server {
@@ -312,7 +302,6 @@ func TestServerStaticPeers(t *testing.T) {
312302
313303// Tests that trusted peers and can connect above max peer caps.
314304func TestServerTrustedPeers (t * testing.T ) {
315- defer testlog (t ).detach ()
316305
317306 // Create a trusted peer to accept connections from
318307 key := newkey ()
@@ -374,8 +363,6 @@ func TestServerTrustedPeers(t *testing.T) {
374363
375364// Tests that a failed dial will temporarily throttle a peer.
376365func TestServerMaxPendingDials (t * testing.T ) {
377- defer testlog (t ).detach ()
378-
379366 // Start a simple test server
380367 server := & Server {
381368 ListenAddr : "127.0.0.1:0" ,
@@ -443,8 +430,6 @@ func TestServerMaxPendingDials(t *testing.T) {
443430}
444431
445432func TestServerMaxPendingAccepts (t * testing.T ) {
446- defer testlog (t ).detach ()
447-
448433 // Start a test server and a peer sink for synchronization
449434 started := make (chan * Peer )
450435 server := & Server {
0 commit comments