Reset listener=nil before running main() from test cases, so
[arvados.git] / services / keepproxy / keepproxy_test.go
index 0ac843f3250c1c5b25d316de424df630c00d0b13..11dd206fa8087d9f3722629d5ee2bc7640fbb625 100644 (file)
@@ -138,6 +138,7 @@ func runProxy(c *C, args []string, token string, port int) keepclient.KeepClient
        os.Args = append(args, fmt.Sprintf("-listen=:%v", port))
        os.Setenv("ARVADOS_API_TOKEN", "4axaw8zxe0qm22wa6urpp5nskcne8z88cvbupv653y1njyi05h")
 
+       listener = nil
        go main()
        time.Sleep(100 * time.Millisecond)
 
@@ -162,6 +163,7 @@ func (s *ServerRequiredSuite) TestPutAskGet(c *C) {
 
        os.Args = []string{"keepproxy", "-listen=:29950"}
        os.Setenv("ARVADOS_API_TOKEN", "4axaw8zxe0qm22wa6urpp5nskcne8z88cvbupv653y1njyi05h")
+       listener = nil
        go main()
        time.Sleep(100 * time.Millisecond)