cmd/swarm: speed up tests (#17878)

These minor changes already shaved off around 30s.
This commit is contained in:
Elad
2018-10-09 14:08:40 +02:00
committed by Felix Lange
parent 0fe9a372b3
commit da290e9707
4 changed files with 38 additions and 31 deletions

View File

@ -40,6 +40,9 @@ import (
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/rpc"
"github.com/ethereum/go-ethereum/swarm"
"github.com/ethereum/go-ethereum/swarm/api"
swarmhttp "github.com/ethereum/go-ethereum/swarm/api/http"
"github.com/ethereum/go-ethereum/swarm/testutil"
)
var loglevel = flag.Int("loglevel", 3, "verbosity of logs")
@ -55,6 +58,9 @@ func init() {
})
}
func serverFunc(api *api.API) testutil.TestServer {
return swarmhttp.NewServer(api, "")
}
func TestMain(m *testing.M) {
// check if we have been reexec'd
if reexec.Init() {