Migrate Channel.AnalyticsTypeCount to Sync by default (#11097)

* Migrate Channel.AnalyticsTypeCount to Sync by default

* Fixing tests
Этот коммит содержится в:
Jesús Espino
2019-06-14 19:06:30 +02:00
коммит произвёл GitHub
родитель b13c5eabff
Коммит 7c4cc21475
9 изменённых файлов: 65 добавлений и 65 удалений

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

@@ -92,8 +92,7 @@ func AssertAllPostsCount(t *testing.T, a *App, initialCount int64, change int64,
}
func AssertChannelCount(t *testing.T, a *App, channelType string, expectedCount int64) {
if r := <-a.Srv.Store.Channel().AnalyticsTypeCount("", channelType); r.Err == nil {
count := r.Data.(int64)
if count, err := a.Srv.Store.Channel().AnalyticsTypeCount("", channelType); err == nil {
if count != expectedCount {
debug.PrintStack()
t.Fatalf("Channel count of type: %v. Expected: %v, Got: %v", channelType, expectedCount, count)