From 4a1802c039a0db2d97e8351c462963a99da857bf Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Mon, 5 Mar 2018 10:35:26 -0500 Subject: MM-9664 Add invalidation metrics for store caches (#8340) * Add invalidation metrics for store caches * Increment session invalidation metric * Fix tests --- api4/channel_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'api4/channel_test.go') diff --git a/api4/channel_test.go b/api4/channel_test.go index e65918707..51c32cf71 100644 --- a/api4/channel_test.go +++ b/api4/channel_test.go @@ -13,7 +13,6 @@ import ( "testing" "github.com/mattermost/mattermost-server/model" - "github.com/mattermost/mattermost-server/store/sqlstore" ) func TestCreateChannel(t *testing.T) { @@ -909,7 +908,7 @@ func TestDeleteChannel(t *testing.T) { // successful delete by channel admin th.MakeUserChannelAdmin(user, publicChannel6) th.MakeUserChannelAdmin(user, privateChannel7) - sqlstore.ClearChannelCaches() + th.App.Srv.Store.Channel().ClearCaches() _, resp = Client.DeleteChannel(publicChannel6.Id) CheckNoError(t, resp) @@ -960,7 +959,7 @@ func TestDeleteChannel(t *testing.T) { // // cannot delete by channel admin th.MakeUserChannelAdmin(user, publicChannel6) th.MakeUserChannelAdmin(user, privateChannel7) - sqlstore.ClearChannelCaches() + th.App.Srv.Store.Channel().ClearCaches() _, resp = Client.DeleteChannel(publicChannel6.Id) CheckForbiddenStatus(t, resp) @@ -1001,7 +1000,7 @@ func TestDeleteChannel(t *testing.T) { // cannot delete by channel admin th.MakeUserChannelAdmin(user, publicChannel6) th.MakeUserChannelAdmin(user, privateChannel7) - sqlstore.ClearChannelCaches() + th.App.Srv.Store.Channel().ClearCaches() _, resp = Client.DeleteChannel(publicChannel6.Id) CheckForbiddenStatus(t, resp) -- cgit v1.2.3-1-g7c22