From 15b6046a629572f01118711ea435ee4a5450cc10 Mon Sep 17 00:00:00 2001 From: Ashish Bhate Date: Tue, 9 Aug 2022 16:49:43 +0530 Subject: [PATCH] MM-44922: Flush log buffer before assert (#20795) Summary Flush log buffer before asserting log text. Ticket Link https://mattermost.atlassian.net/browse/MM-44922 --- app/import_functions_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/import_functions_test.go b/app/import_functions_test.go index c764e44c19..a6e47edddc 100644 --- a/app/import_functions_test.go +++ b/app/import_functions_test.go @@ -3100,7 +3100,6 @@ func TestImportImportPost(t *testing.T) { }) t.Run("Reply CreateAt before parent post CreateAt", func(t *testing.T) { - t.Skip("MM-44922") now := model.GetMillis() before := now - 10 data := LineImportWorkerData{ @@ -3128,6 +3127,7 @@ func TestImportImportPost(t *testing.T) { posts, nErr := th.App.Srv().Store.Post().GetPostsCreatedAt(channel.Id, now) require.NoError(t, nErr) require.Len(t, posts, 2, "Unexpected number of posts found.") + require.NoError(t, th.TestLogger.Flush()) testlib.AssertLog(t, th.LogBuffer, mlog.LvlWarn.Name, "Reply CreateAt is before parent post CreateAt, setting it to parent post CreateAt") rootPost := posts[0]