good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
3d067b0c
Unverified
Commit
3d067b0c
authored
Mar 15, 2019
by
Anton Evangelatov
Committed by
GitHub
Mar 15, 2019
Browse files
Options
Downloads
Patches
Plain Diff
cmd/swarm/swarm-smoke: do not fail if a node does not respond to rpc (#19280)
parent
f1809812
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmd/swarm/swarm-smoke/upload_and_sync.go
+12
-4
12 additions, 4 deletions
cmd/swarm/swarm-smoke/upload_and_sync.go
with
12 additions
and
4 deletions
cmd/swarm/swarm-smoke/upload_and_sync.go
+
12
−
4
View file @
3d067b0c
...
...
@@ -44,7 +44,7 @@ func uploadAndSyncCmd(ctx *cli.Context, tuid string) error {
errc
:=
make
(
chan
error
)
go
func
()
{
errc
<-
upl
a
odAndSync
(
ctx
,
randomBytes
,
tuid
)
errc
<-
uplo
a
dAndSync
(
ctx
,
randomBytes
,
tuid
)
}()
select
{
...
...
@@ -65,6 +65,14 @@ func uploadAndSyncCmd(ctx *cli.Context, tuid string) error {
return
e
}
// trigger debug functionality on randomBytes even on successful runs
err
:=
trackChunks
(
randomBytes
[
:
])
if
err
!=
nil
{
log
.
Error
(
err
.
Error
())
}
return
nil
}
func
trackChunks
(
testData
[]
byte
)
error
{
...
...
@@ -87,14 +95,14 @@ func trackChunks(testData []byte) error {
rpcClient
,
err
:=
rpc
.
Dial
(
httpHost
)
if
err
!=
nil
{
log
.
Error
(
"Error dialing host"
,
"err"
,
err
)
return
err
continue
}
var
hasInfo
[]
api
.
HasInfo
err
=
rpcClient
.
Call
(
&
hasInfo
,
"bzz_has"
,
addrs
)
if
err
!=
nil
{
log
.
Error
(
"Error calling host"
,
"err"
,
err
)
return
err
continue
}
count
:=
0
...
...
@@ -134,7 +142,7 @@ func getAllRefs(testData []byte) (storage.AddressCollection, error) {
return
fileStore
.
GetAllReferences
(
ctx
,
reader
,
false
)
}
func
upl
a
odAndSync
(
c
*
cli
.
Context
,
randomBytes
[]
byte
,
tuid
string
)
error
{
func
uplo
a
dAndSync
(
c
*
cli
.
Context
,
randomBytes
[]
byte
,
tuid
string
)
error
{
log
.
Info
(
"uploading to "
+
httpEndpoint
(
hosts
[
0
])
+
" and syncing"
,
"tuid"
,
tuid
,
"seed"
,
seed
)
t1
:=
time
.
Now
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment