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
ec9fb77f
Commit
ec9fb77f
authored
Aug 22, 2019
by
Dirk McCormick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: remove test that is no longer needed
parent
84f61d6a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
31 deletions
+0
-31
sessionmanager/sessionmanager_test.go
sessionmanager/sessionmanager_test.go
+0
-31
No files found.
sessionmanager/sessionmanager_test.go
View file @
ec9fb77f
...
...
@@ -145,37 +145,6 @@ func TestAddingSessions(t *testing.T) {
}
}
func
TestReceivingBlocksWhenNotInterested
(
t
*
testing
.
T
)
{
ctx
:=
context
.
Background
()
ctx
,
cancel
:=
context
.
WithCancel
(
ctx
)
defer
cancel
()
notif
:=
notifications
.
New
()
defer
notif
.
Shutdown
()
sm
:=
New
(
ctx
,
sessionFactory
,
peerManagerFactory
,
requestSplitterFactory
,
notif
)
p
:=
peer
.
ID
(
123
)
blks
:=
testutil
.
GenerateBlocksOfSize
(
3
,
1024
)
var
cids
[]
cid
.
Cid
for
_
,
b
:=
range
blks
{
cids
=
append
(
cids
,
b
.
Cid
())
}
nextWanted
=
[]
cid
.
Cid
{
cids
[
0
],
cids
[
1
]}
firstSession
:=
sm
.
NewSession
(
ctx
,
time
.
Second
,
delay
.
Fixed
(
time
.
Minute
))
.
(
*
fakeSession
)
nextWanted
=
[]
cid
.
Cid
{
cids
[
0
]}
secondSession
:=
sm
.
NewSession
(
ctx
,
time
.
Second
,
delay
.
Fixed
(
time
.
Minute
))
.
(
*
fakeSession
)
nextWanted
=
[]
cid
.
Cid
{}
thirdSession
:=
sm
.
NewSession
(
ctx
,
time
.
Second
,
delay
.
Fixed
(
time
.
Minute
))
.
(
*
fakeSession
)
sm
.
ReceiveFrom
(
p
,
[]
cid
.
Cid
{
blks
[
0
]
.
Cid
(),
blks
[
1
]
.
Cid
()})
if
!
cmpSessionCids
(
firstSession
,
[]
cid
.
Cid
{
cids
[
0
],
cids
[
1
]})
||
!
cmpSessionCids
(
secondSession
,
[]
cid
.
Cid
{
cids
[
0
]})
||
!
cmpSessionCids
(
thirdSession
,
[]
cid
.
Cid
{})
{
t
.
Fatal
(
"did not receive correct blocks for sessions"
)
}
}
func
TestIsWanted
(
t
*
testing
.
T
)
{
ctx
:=
context
.
Background
()
ctx
,
cancel
:=
context
.
WithCancel
(
ctx
)
...
...
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