Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
9a241a2a
Unverified
Commit
9a241a2a
authored
Oct 26, 2020
by
Emil Hessman
Committed by
GitHub
Oct 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chore: Fix flaky sqlstore annotation test (#28527)
parent
639460a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
pkg/services/sqlstore/annotation.go
+2
-2
pkg/services/sqlstore/annotation_test.go
+2
-0
No files found.
pkg/services/sqlstore/annotation.go
View file @
9a241a2a
...
...
@@ -35,7 +35,7 @@ func (r *SqlAnnotationRepo) Save(item *annotations.Item) error {
return
inTransaction
(
func
(
sess
*
DBSession
)
error
{
tags
:=
models
.
ParseTagPairs
(
item
.
Tags
)
item
.
Tags
=
models
.
JoinTagPairs
(
tags
)
item
.
Created
=
time
.
Now
()
.
UnixNano
()
/
int64
(
time
.
Millisecond
)
item
.
Created
=
timeNow
()
.
UnixNano
()
/
int64
(
time
.
Millisecond
)
item
.
Updated
=
item
.
Created
if
item
.
Epoch
==
0
{
item
.
Epoch
=
item
.
Created
...
...
@@ -81,7 +81,7 @@ func (r *SqlAnnotationRepo) Update(item *annotations.Item) error {
return
errors
.
New
(
"Annotation not found"
)
}
existing
.
Updated
=
time
.
Now
()
.
UnixNano
()
/
int64
(
time
.
Millisecond
)
existing
.
Updated
=
timeNow
()
.
UnixNano
()
/
int64
(
time
.
Millisecond
)
existing
.
Text
=
item
.
Text
if
item
.
Epoch
!=
0
{
...
...
pkg/services/sqlstore/annotation_test.go
View file @
9a241a2a
...
...
@@ -11,6 +11,8 @@ import (
)
func
TestAnnotations
(
t
*
testing
.
T
)
{
mockTimeNow
()
defer
resetTimeNow
()
InitTestDB
(
t
)
Convey
(
"Testing annotation saving/loading"
,
t
,
func
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment