Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
interface-go-dms3-core
Commits
a7d4a719
Commit
a7d4a719
authored
Mar 26, 2019
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: remove ticker leak
parent
5f17f834
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
tests/pubsub.go
tests/pubsub.go
+3
-2
No files found.
tests/pubsub.go
View file @
a7d4a719
...
...
@@ -35,7 +35,8 @@ func (tp *provider) TestBasicPubSub(t *testing.T) {
}
go
func
()
{
tick
:=
time
.
Tick
(
100
*
time
.
Millisecond
)
ticker
:=
time
.
NewTicker
(
100
*
time
.
Millisecond
)
defer
ticker
.
Stop
()
for
{
err
:=
apis
[
1
]
.
PubSub
()
.
Publish
(
ctx
,
"testch"
,
[]
byte
(
"hello world"
))
...
...
@@ -45,7 +46,7 @@ func (tp *provider) TestBasicPubSub(t *testing.T) {
return
}
select
{
case
<-
tick
:
case
<-
tick
er
.
C
:
case
<-
ctx
.
Done
()
:
return
}
...
...
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