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
5f17f834
Commit
5f17f834
authored
Mar 26, 2019
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: remove t.Fatal from goroutines
parent
6d166d40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
tests/pubsub.go
tests/pubsub.go
+3
-1
tests/unixfs.go
tests/unixfs.go
+5
-3
No files found.
tests/pubsub.go
View file @
5f17f834
...
...
@@ -40,7 +40,9 @@ func (tp *provider) TestBasicPubSub(t *testing.T) {
for
{
err
:=
apis
[
1
]
.
PubSub
()
.
Publish
(
ctx
,
"testch"
,
[]
byte
(
"hello world"
))
if
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Error
(
err
)
cancel
()
return
}
select
{
case
<-
tick
:
...
...
tests/unixfs.go
View file @
5f17f834
...
...
@@ -423,11 +423,13 @@ func (tp *provider) TestAdd(t *testing.T) {
for
evt
:=
range
eventOut
{
event
,
ok
:=
evt
.
(
*
coreiface
.
AddEvent
)
if
!
ok
{
t
.
Fatal
(
"unexpected event type"
)
t
.
Error
(
"unexpected event type"
)
continue
}
if
len
(
expected
)
<
1
{
t
.
Fatal
(
"got more events than expected"
)
t
.
Error
(
"got more events than expected"
)
continue
}
if
expected
[
0
]
.
Size
!=
event
.
Size
{
...
...
@@ -453,7 +455,7 @@ func (tp *provider) TestAdd(t *testing.T) {
}
if
len
(
expected
)
>
0
{
t
.
Fatal
f
(
"%d event(s) didn't arrive"
,
len
(
expected
))
t
.
Error
f
(
"%d event(s) didn't arrive"
,
len
(
expected
))
}
}()
}
...
...
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