fix for a flaky test

This commit is contained in:
Dalton 2020-06-16 14:42:58 -05:00 committed by Dalton Cherry
parent 0f893fab47
commit 7b2f286210
1 changed files with 2 additions and 2 deletions

View File

@ -25,12 +25,12 @@ func TestSessionLogWrite(t *testing.T) {
testStr := "hi"
logger := createSessionLogger(t)
defer func() {
logger.Close()
os.Remove(sessionLogFileName)
}()
logger.Write([]byte(testStr))
time.Sleep(2 * time.Millisecond)
logger.Close()
f, err := os.Open(sessionLogFileName)
if err != nil {
t.Fatal("couldn't read the log file!", err)