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
go-bitswap
Commits
6ea1681f
Unverified
Commit
6ea1681f
authored
Apr 30, 2021
by
Steven Allen
Committed by
GitHub
Apr 30, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #480 from ipfs/fix/deflake-tag-test
test: deflake engine test
parents
038c8934
11985797
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
internal/decision/engine_test.go
internal/decision/engine_test.go
+5
-5
No files found.
internal/decision/engine_test.go
View file @
6ea1681f
...
...
@@ -1058,18 +1058,18 @@ func TestTaggingUseful(t *testing.T) {
msg.AddBlock(block)
for i := 0; i < 3; i++ {
if me.PeerTagger.count(me.Engine.tagUseful) != 0 {
t.Fatal("
P
eers should be untagged but weren't")
if
untagged :=
me.PeerTagger.count(me.Engine.tagUseful)
; untagged
!= 0 {
t.Fatal
f
("
%d p
eers should be untagged but weren't"
, untagged
)
}
me.Engine.MessageSent(friend, msg)
for j := 0; j <
3
; j++ {
for j := 0; j <
2
; j++ {
<-sampleCh
}
if me.PeerTagger.count(me.Engine.tagUseful) != 1 {
t.Fatal("
P
eer
s
should be tagged but were
n't"
)
if
tagged :=
me.PeerTagger.count(me.Engine.tagUseful)
; tagged
!= 1 {
t.Fatal
f
("
1 p
eer should be tagged
,
but
%d
were
", tagged
)
}
for j := 0; j < longTermRatio; j++ {
...
...
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