diff options
author | =Corey Hulen <corey@hulen.com> | 2015-07-05 09:33:08 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-07-05 09:33:08 -0800 |
commit | 9261b1ec62e67a4a222e40dfae4376bbeebd3fa0 (patch) | |
tree | ded0a4300234ae3f38076104b574625f53da9319 /store | |
parent | 60f53504025819b57999de3cbb53a68fa102f007 (diff) | |
download | chat-9261b1ec62e67a4a222e40dfae4376bbeebd3fa0.tar.gz chat-9261b1ec62e67a4a222e40dfae4376bbeebd3fa0.tar.bz2 chat-9261b1ec62e67a4a222e40dfae4376bbeebd3fa0.zip |
fixing timming test
Diffstat (limited to 'store')
-rw-r--r-- | store/sql_audit_store_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/store/sql_audit_store_test.go b/store/sql_audit_store_test.go index 3e6f22730..9074f57c7 100644 --- a/store/sql_audit_store_test.go +++ b/store/sql_audit_store_test.go @@ -6,6 +6,7 @@ package store import ( "github.com/mattermost/platform/model" "testing" + "time" ) func TestSqlAuditStore(t *testing.T) { @@ -13,11 +14,17 @@ func TestSqlAuditStore(t *testing.T) { audit := &model.Audit{UserId: model.NewId(), IpAddress: "ipaddress", Action: "Action"} <-store.Audit().Save(audit) + time.Sleep(100 * time.Millisecond) <-store.Audit().Save(audit) + time.Sleep(100 * time.Millisecond) <-store.Audit().Save(audit) + time.Sleep(100 * time.Millisecond) audit.ExtraInfo = "extra" + time.Sleep(100 * time.Millisecond) <-store.Audit().Save(audit) + time.Sleep(100 * time.Millisecond) + c := store.Audit().Get(audit.UserId, 100) result := <-c audits := result.Data.(model.Audits) |