Files
mostlymatter/store
Agniva De Sarker 456bd4cd70 MM-23063: Fix flaky test TestTermsOfServiceStore (#15321)
* MM-23063: Fix flaky test TestTermsOfServiceStore

The call to testGetLatestTermsOfService would happen after testSaveTermsOfService
which would persist the data between calls. Therefore, if they were to happen under
a milisecond, there would be 2 rows with the same CreateAt timestamp and the DB
would randomly return any row.

If this were to happen, then the wrong row would not match the user id and would fail.

To fix this, we just clear the table data before proceeding with the test.

https://mattermost.atlassian.net/browse/MM-23063

* Use t.Cleanup to refactor things

* Fix cleanup of tables

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-08-24 09:20:57 +02:00
..
2020-08-24 11:16:35 +05:30
2020-08-20 19:36:13 +05:30
2020-08-20 19:37:19 +05:30
2020-08-24 11:16:35 +05:30
2020-08-20 19:37:19 +05:30
2020-07-28 10:27:24 +05:30
2020-08-20 19:37:19 +05:30