dragonflyoss / Dragonfly

This repository has be archived and moved to the new repository https://github.com/dragonflyoss/Dragonfly2.
https://d7y.io
Apache License 2.0
6k stars 774 forks source link

Unit tests failed: HTTPSuite.SetUpTest #1556

Open timmyyuan opened 3 years ago

timmyyuan commented 3 years ago

Ⅰ. Issue Description

unit tests failed

Ⅱ. Describe what happened

I tried to run unit tests but the tests failed:

----------------------------------------------------------------------
FAIL: resource_test.go:37: HTTPSuite.SetUpTest

resource_test.go:43:
    c.Assert(err, check.IsNil)
... value *net.OpError = &net.OpError{Op:"listen", Net:"tcp", Source:net.Addr(nil), Addr:(*net.TCPAddr)(0xc000580030), Err:(*os.SyscallError)(0xc000314040)} ("listen tcp :64000: bind: address already in use")

----------------------------------------------------------------------
PANIC: resource_test.go:85: HTTPSuite.TestResource

... Panic: Fixture has panicked (see related PANIC)
OOPS: 1 passed, 1 FAILED, 1 MISSED
--- FAIL: Test (0.00s)
FAIL
coverage: 9.6% of statements

Ⅲ. Describe what you expected to happen

The tests should pass

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. checkout the master branch
  2. make unit-test

Ⅴ. Anything else we need to know?

Ⅵ. Environment: