diff --git a/test/web_api/query_test.go b/test/web_api/query_test.go index e6714d1751e7139731832158410fc3d258f6fed1..5b6e1299a0c4e3194663ac30ed5409d646309d55 100644 --- a/test/web_api/query_test.go +++ b/test/web_api/query_test.go @@ -2,6 +2,7 @@ package web_api // Basic imports import ( + "io/ioutil" "bytes" "fmt" edb "github.com/eris-ltd/eris-db/erisdb" @@ -45,6 +46,12 @@ func (this *QuerySuite) SetupSuite() { requestData := &ess.RequestData{testData.ChainData.PrivValidator, testData.ChainData.Genesis, SERVER_DURATION} rBts, _ := this.codec.EncodeBytes(requestData) resp, _ := http.Post(QS_URL, "application/json", bytes.NewBuffer(rBts)) + if resp.StatusCode != 200 { + bts, _ := ioutil.ReadAll(resp.Body) + fmt.Println("ERROR GETTING SS ADDRESS: " + string(bts)) + fmt.Printf("%v\n", resp) + panic(fmt.Errorf(string(bts))) + } rd := &ess.ResponseData{} err2 := this.codec.Decode(rd, resp.Body) if err2 != nil { diff --git a/test/web_api/shared.go b/test/web_api/shared.go index 56ed22506e4108380bfc8db76b29a3b6310edbbf..de34827b995e168e66098ec923350dd54b9d0b37 100644 --- a/test/web_api/shared.go +++ b/test/web_api/shared.go @@ -1,19 +1,19 @@ package web_api import ( - // "github.com/gin-gonic/gin" + "github.com/gin-gonic/gin" "github.com/tendermint/log15" "os" - // "runtime" + "runtime" ) const SERVER_DURATION = 10 func init() { - // runtime.GOMAXPROCS(runtime.NumCPU()) + runtime.GOMAXPROCS(runtime.NumCPU()) log15.Root().SetHandler(log15.LvlFilterHandler( log15.LvlDebug, log15.StreamHandler(os.Stdout, log15.TerminalFormat()), )) - //gin.SetMode(gin.ReleaseMode) + gin.SetMode(gin.ReleaseMode) }