fixing golint issues to try to figure out test flakiness
This commit is contained in:
+6
-5
@@ -14,23 +14,23 @@ import (
|
||||
)
|
||||
|
||||
type World struct {
|
||||
CH CaddyHugo
|
||||
CH *CaddyHugo
|
||||
BlogFolder string
|
||||
}
|
||||
|
||||
func (w World) Clean() {
|
||||
func (w *World) Clean() {
|
||||
if w.BlogFolder != "" {
|
||||
os.RemoveAll(w.BlogFolder)
|
||||
}
|
||||
}
|
||||
|
||||
func NewWorld(t *testing.T) World {
|
||||
func NewWorld(t *testing.T) *World {
|
||||
dir, err := ioutil.TempDir("", "caddy-hugo2-test-")
|
||||
if err != nil {
|
||||
t.Fatalf("error initializing test environment: %v", err)
|
||||
}
|
||||
|
||||
w := World{BlogFolder: dir}
|
||||
w := &World{BlogFolder: dir}
|
||||
|
||||
cmd := exec.Command("hugo", "new", "site", dir)
|
||||
cmd.Dir = dir
|
||||
@@ -39,6 +39,7 @@ func NewWorld(t *testing.T) World {
|
||||
t.Fatalf("error initializing test site: %v\n\n%v", err, string(out))
|
||||
}
|
||||
|
||||
w.CH = &CaddyHugo{}
|
||||
w.CH.Setup(dir)
|
||||
|
||||
return w
|
||||
@@ -232,7 +233,7 @@ func TestDeltasDouble(t *testing.T) {
|
||||
// send the second message, via clientB
|
||||
clientB.ReceiveJSON(w.CH.Message(acedoc.Insert(0, 0, "b")))
|
||||
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
|
||||
clientA.mtx.Lock()
|
||||
clientB.mtx.Lock()
|
||||
|
||||
Reference in New Issue
Block a user