Fix badger test

This commit is contained in:
Patrick Pacher 2020-04-15 17:56:42 +02:00
parent 558486483b
commit 26c35f2f74
No known key found for this signature in database
GPG key ID: E8CD2DA160925A6D
2 changed files with 3 additions and 3 deletions

View file

@ -65,7 +65,7 @@ func TestBadger(t *testing.T) {
a.SetKey("test:A")
// put record
err = db.Put(a)
_, err = db.Put(a)
if err != nil {
t.Fatal(err)
}

View file

@ -41,7 +41,7 @@ func writeLine(line *logLine, duplicates uint64) {
}
func startWriter() {
fmt.Println(fmt.Sprintf("%s%s %s BOF%s", InfoLevel.color(), time.Now().Format(timeFormat), rightArrow, endColor()))
fmt.Printf("%s%s %s BOF%s\n", InfoLevel.color(), time.Now().Format(timeFormat), rightArrow, endColor())
shutdownWaitGroup.Add(1)
go writerManager()
@ -168,7 +168,7 @@ func finalizeWriting() {
case line := <-logBuffer:
writeLine(line, 0)
case <-time.After(10 * time.Millisecond):
fmt.Println(fmt.Sprintf("%s%s %s EOF%s", InfoLevel.color(), time.Now().Format(timeFormat), leftArrow, endColor()))
fmt.Printf("%s%s %s EOF%s\n", InfoLevel.color(), time.Now().Format(timeFormat), leftArrow, endColor())
return
}
}