Git: fix for data races.

This commit is contained in:
Abiola Ibrahim
2015-06-07 20:31:34 +01:00
parent 995a2ea618
commit c42e60a3d2
7 changed files with 65 additions and 34 deletions
+2 -3
View File
@@ -2,7 +2,6 @@ package setup
import (
"io/ioutil"
"log"
"strings"
"testing"
"time"
@@ -42,7 +41,7 @@ func TestIntervals(t *testing.T) {
}
for i, test := range tests {
git.Logger = nil
git.SetLogger(gittest.NewLogger(gittest.Open("file")))
c1 := newTestController(test)
repo, err := gitParse(c1)
@@ -61,7 +60,7 @@ func TestIntervals(t *testing.T) {
// switch logger to test file
logFile := gittest.Open("file")
git.Logger = log.New(logFile, "", 0)
git.SetLogger(gittest.NewLogger(logFile))
// sleep for the interval
gittest.Sleep(repo.Interval)