From f5832cda02053eca9a911b96b44198e433202381 Mon Sep 17 00:00:00 2001 From: Michael Baird Date: Tue, 22 Aug 2017 15:13:21 -0500 Subject: [PATCH] Clarify that Holder Reopen requires Close to be run beforehand. --- handler.go | 2 ++ test/holder.go | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/handler.go b/handler.go index 38254e1ae..cfc96c397 100644 --- a/handler.go +++ b/handler.go @@ -27,6 +27,7 @@ import ( "io/ioutil" "log" "net/http" + // Imported for its side-effect of registering pprof endpoints with the server. _ "net/http/pprof" "os" "runtime/debug" @@ -43,6 +44,7 @@ import ( "unicode" + // Allow building Pilosa without the web UI. _ "github.com/pilosa/pilosa/statik" "github.com/rakyll/statik/fs" ) diff --git a/test/holder.go b/test/holder.go index 099b9cb7b..9523db407 100644 --- a/test/holder.go +++ b/test/holder.go @@ -44,11 +44,8 @@ func (h *Holder) Close() error { } // Reopen closes the holder and instantiates and opens a new holder. +// note that the hold most be Closed first func (h *Holder) Reopen() error { - // if err := h.Holder.Close(); err != nil { - // return err - // } - path, logOutput := h.Path, h.Holder.LogOutput h.Holder = pilosa.NewHolder() h.Holder.Path = path