[MM-36411] Fix flaky TestUpdateConfigDiffInAuditRecord (#17777)

* Fix flaky test

* Force log flush only
Этот коммит содержится в:
Claudio Costa
2021-06-14 16:42:09 +02:00
коммит произвёл GitHub
родитель 2ffcec3b5b
Коммит 0ae307808a

Просмотреть файл

@@ -4,6 +4,7 @@
package api4
import (
"context"
"fmt"
"io/ioutil"
"net/http"
@@ -470,6 +471,10 @@ func TestUpdateConfigDiffInAuditRecord(t *testing.T) {
})
require.Equal(t, timeoutVal+1, *cfg.ServiceSettings.ReadTimeout)
// Forcing a flush before attempting to read log's content.
err = th.Server.Log.Flush(context.Background())
require.NoError(t, err)
data, err := ioutil.ReadAll(logFile)
require.NoError(t, err)
require.NotEmpty(t, data)