fix for a flaky test
This commit is contained in:
parent
0f893fab47
commit
7b2f286210
|
@ -25,12 +25,12 @@ func TestSessionLogWrite(t *testing.T) {
|
||||||
testStr := "hi"
|
testStr := "hi"
|
||||||
logger := createSessionLogger(t)
|
logger := createSessionLogger(t)
|
||||||
defer func() {
|
defer func() {
|
||||||
logger.Close()
|
|
||||||
os.Remove(sessionLogFileName)
|
os.Remove(sessionLogFileName)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
logger.Write([]byte(testStr))
|
logger.Write([]byte(testStr))
|
||||||
time.Sleep(2 * time.Millisecond)
|
logger.Close()
|
||||||
|
|
||||||
f, err := os.Open(sessionLogFileName)
|
f, err := os.Open(sessionLogFileName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal("couldn't read the log file!", err)
|
t.Fatal("couldn't read the log file!", err)
|
||||||
|
|
Loading…
Reference in New Issue