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-graphsync
Commits
444faec0
Unverified
Commit
444faec0
authored
Jun 11, 2019
by
Hannah Howard
Committed by
GitHub
Jun 11, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #34 from ipfs/feat/add-travis
ci(travis): add travis.yml
parents
ec235713
f07e2e65
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
26 deletions
+59
-26
.travis.yml
.travis.yml
+31
-0
graphsync.go
graphsync.go
+1
-1
responsemanager/responsemanager_test.go
responsemanager/responsemanager_test.go
+27
-25
No files found.
.travis.yml
0 → 100644
View file @
444faec0
os
:
-
linux
language
:
go
go
:
-
1.11.x
env
:
global
:
-
GOTFLAGS="-race"
matrix
:
-
BUILD_DEPTYPE=gomod
# disable travis install
install
:
-
true
script
:
-
bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh)
cache
:
directories
:
-
$GOPATH/src/gx
-
$GOPATH/pkg/mod
-
$HOME/.cache/go-build
notifications
:
email
:
false
graphsync.go
View file @
444faec0
...
@@ -14,8 +14,8 @@ import (
...
@@ -14,8 +14,8 @@ import (
"github.com/ipfs/go-graphsync/requestmanager"
"github.com/ipfs/go-graphsync/requestmanager"
"github.com/ipfs/go-graphsync/responsemanager"
"github.com/ipfs/go-graphsync/responsemanager"
"github.com/ipfs/go-graphsync/responsemanager/peerresponsemanager"
"github.com/ipfs/go-graphsync/responsemanager/peerresponsemanager"
"github.com/ipfs/go-peertaskqueue"
logging
"github.com/ipfs/go-log"
logging
"github.com/ipfs/go-log"
"github.com/ipfs/go-peertaskqueue"
ipld
"github.com/ipld/go-ipld-prime"
ipld
"github.com/ipld/go-ipld-prime"
"github.com/libp2p/go-libp2p-peer"
"github.com/libp2p/go-libp2p-peer"
)
)
...
...
responsemanager/responsemanager_test.go
View file @
444faec0
...
@@ -12,9 +12,9 @@ import (
...
@@ -12,9 +12,9 @@ import (
cid
"github.com/ipfs/go-cid"
cid
"github.com/ipfs/go-cid"
gsmsg
"github.com/ipfs/go-graphsync/message"
gsmsg
"github.com/ipfs/go-graphsync/message"
"github.com/ipfs/go-graphsync/responsemanager/peerresponsemanager"
"github.com/ipfs/go-graphsync/responsemanager/peerresponsemanager"
"github.com/ipfs/go-peertaskqueue/peertask"
"github.com/ipfs/go-graphsync/testbridge"
"github.com/ipfs/go-graphsync/testbridge"
"github.com/ipfs/go-graphsync/testutil"
"github.com/ipfs/go-graphsync/testutil"
"github.com/ipfs/go-peertaskqueue/peertask"
ipld
"github.com/ipld/go-ipld-prime"
ipld
"github.com/ipld/go-ipld-prime"
cidlink
"github.com/ipld/go-ipld-prime/linking/cid"
cidlink
"github.com/ipld/go-ipld-prime/linking/cid"
peer
"github.com/libp2p/go-libp2p-peer"
peer
"github.com/libp2p/go-libp2p-peer"
...
@@ -222,9 +222,18 @@ func TestCancellationQueryInProgress(t *testing.T) {
...
@@ -222,9 +222,18 @@ func TestCancellationQueryInProgress(t *testing.T) {
responseManager
.
synchronize
()
responseManager
.
synchronize
()
// read one block -- to unblock processing
// at this point we should receive at most one more block, then traversal
// should complete
additionalMessageCount
:=
0
drainqueue
:
for
{
select
{
select
{
case
<-
ctx
.
Done
()
:
t
.
Fatal
(
"Should have completed request but didn't"
)
case
sentResponse
:=
<-
sentResponses
:
case
sentResponse
:=
<-
sentResponses
:
if
additionalMessageCount
>
0
{
t
.
Fatal
(
"should not send any more responses"
)
}
k
:=
sentResponse
.
link
.
(
cidlink
.
Link
)
k
:=
sentResponse
.
link
.
(
cidlink
.
Link
)
blockIndex
:=
testutil
.
IndexOf
(
blks
,
k
.
Cid
)
blockIndex
:=
testutil
.
IndexOf
(
blks
,
k
.
Cid
)
if
blockIndex
==
-
1
{
if
blockIndex
==
-
1
{
...
@@ -236,17 +245,10 @@ func TestCancellationQueryInProgress(t *testing.T) {
...
@@ -236,17 +245,10 @@ func TestCancellationQueryInProgress(t *testing.T) {
if
sentResponse
.
requestID
!=
requestID
{
if
sentResponse
.
requestID
!=
requestID
{
t
.
Fatal
(
"incorrect response id"
)
t
.
Fatal
(
"incorrect response id"
)
}
}
case
<-
ctx
.
Done
()
:
additionalMessageCount
++
t
.
Fatal
(
"did not send responses"
)
}
// at this point traversal should abort and we should receive a completion
select
{
case
<-
ctx
.
Done
()
:
t
.
Fatal
(
"Should have completed request but didn't"
)
case
<-
sentResponses
:
t
.
Fatal
(
"should not send any more responses"
)
case
<-
requestIDChan
:
case
<-
requestIDChan
:
break
drainqueue
}
}
}
}
}
...
...
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