From 60b054d58c0e0e77cc7f8769661dbd16144b14a0 Mon Sep 17 00:00:00 2001 From: tidwall Date: Mon, 29 Oct 2018 08:16:04 -0700 Subject: [PATCH] Fixed test --- internal/log/log.go | 4 ++++ tests/107/main.go | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/log/log.go b/internal/log/log.go index 6f1a7e29..993f0dad 100644 --- a/internal/log/log.go +++ b/internal/log/log.go @@ -28,6 +28,10 @@ func SetOutput(w io.Writer) { wr = w } +func init() { + SetOutput(os.Stderr) +} + func log(level int, tag, color string, formatted bool, format string, args ...interface{}) { if Level < level { return diff --git a/tests/107/main.go b/tests/107/main.go index c4724d51..2a0d5f20 100644 --- a/tests/107/main.go +++ b/tests/107/main.go @@ -20,7 +20,7 @@ import ( "github.com/gomodule/redigo/redis" "github.com/tidwall/gjson" - "github.com/tidwall/tile38/controller" + "github.com/tidwall/tile38/internal/server" ) const tile38Port = 9191 @@ -31,7 +31,6 @@ var tile38Addr string var httpAddr string var wd string -var server string var minX float64 var minY float64 @@ -101,7 +100,7 @@ func main() { func startTile38Server() { log.Println("start tile38 server") - err := controller.ListenAndServe("localhost", tile38Port, "data") + err := server.Serve("localhost", tile38Port, "data", false) if err != nil { log.Fatal(err) }