mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/swarm/swarm-smoke: renamed track-timeout and track-chunks
This commit is contained in:
parent
dcdff86b8e
commit
71382131df
2 changed files with 15 additions and 15 deletions
|
|
@ -46,7 +46,7 @@ var (
|
||||||
verbosity int
|
verbosity int
|
||||||
timeout int
|
timeout int
|
||||||
single bool
|
single bool
|
||||||
getAllRefsTimeout int
|
trackTimeout int
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
@ -104,10 +104,10 @@ func main() {
|
||||||
Destination: &single,
|
Destination: &single,
|
||||||
},
|
},
|
||||||
cli.IntFlag{
|
cli.IntFlag{
|
||||||
Name: "refs-timeout",
|
Name: "track-timeout",
|
||||||
Value: 5,
|
Value: 5,
|
||||||
Usage: "timeout in seconds to wait for GetAllReferences to return",
|
Usage: "timeout in seconds to wait for GetAllReferences to return",
|
||||||
Destination: &getAllRefsTimeout,
|
Destination: &trackTimeout,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ func uploadAndSyncCmd(ctx *cli.Context, tuid string) error {
|
||||||
|
|
||||||
e := fmt.Errorf("timeout after %v sec", timeout)
|
e := fmt.Errorf("timeout after %v sec", timeout)
|
||||||
// trigger debug functionality on randomBytes
|
// trigger debug functionality on randomBytes
|
||||||
err := triggerChunkDebug(randomBytes[:])
|
err := trackChunks(randomBytes[:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e = fmt.Errorf("%v; triggerChunkDebug failed: %v", e, err)
|
e = fmt.Errorf("%v; triggerChunkDebug failed: %v", e, err)
|
||||||
}
|
}
|
||||||
|
|
@ -66,7 +66,7 @@ func uploadAndSyncCmd(ctx *cli.Context, tuid string) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func triggerChunkDebug(testData []byte) error {
|
func trackChunks(testData []byte) error {
|
||||||
log.Warn("Test timed out; running chunk debug sequence")
|
log.Warn("Test timed out; running chunk debug sequence")
|
||||||
|
|
||||||
addrs, err := getAllRefs(testData)
|
addrs, err := getAllRefs(testData)
|
||||||
|
|
@ -117,7 +117,7 @@ func getAllRefs(testData []byte) (storage.AddressCollection, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(getAllRefsTimeout)*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(trackTimeout)*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
reader := bytes.NewReader(testData)
|
reader := bytes.NewReader(testData)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue