소스 검색

fix more tests

Darien Raymond 7 년 전
부모
커밋
e4176d7048
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      testing/scenarios/policy_test.go

+ 1 - 4
testing/scenarios/policy_test.go

@@ -168,8 +168,6 @@ func TestVMessClosing(t *testing.T) {
 	nBytes, err = conn.Read(resp)
 	assert(err, Equals, io.EOF)
 	assert(nBytes, Equals, 0)
-
-	CloseAllServers(servers)
 }
 
 func TestZeroBuffer(t *testing.T) {
@@ -275,6 +273,7 @@ func TestZeroBuffer(t *testing.T) {
 
 	servers, err := InitializeServerConfigs(serverConfig, clientConfig)
 	assert(err, IsNil)
+	defer CloseAllServers(servers)
 
 	var wg sync.WaitGroup
 	wg.Add(10)
@@ -300,6 +299,4 @@ func TestZeroBuffer(t *testing.T) {
 		}()
 	}
 	wg.Wait()
-
-	CloseAllServers(servers)
 }