mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
swarm: swap tests simplification
This commit is contained in:
parent
63713a458e
commit
c1f241119f
1 changed files with 6 additions and 12 deletions
|
|
@ -136,12 +136,9 @@ func TestSwapNetworkSymmetricFileUpload(t *testing.T) {
|
||||||
|
|
||||||
// File retrieval check is repeated until all uploaded files are retrieved from all nodes
|
// File retrieval check is repeated until all uploaded files are retrieved from all nodes
|
||||||
// or until the timeout is reached.
|
// or until the timeout is reached.
|
||||||
for {
|
//we use a special retrieve function for swap which is optimized for parallel requests
|
||||||
//we use a special retrieve function for swap which is optimized for parallel requests
|
//but does not leave many cascaded requests floating around
|
||||||
//but does not leave many cascaded requests floating around
|
for retrieveForSwap(sim, files) != 0 {
|
||||||
if retrieveForSwap(sim, files) == 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//iterate all nodes
|
//iterate all nodes
|
||||||
|
|
@ -312,12 +309,9 @@ func TestSwapNetworkAsymmetricFileUpload(t *testing.T) {
|
||||||
|
|
||||||
// File retrieval check is repeated until all uploaded files are retrieved from all nodes
|
// File retrieval check is repeated until all uploaded files are retrieved from all nodes
|
||||||
// or until the timeout is reached.
|
// or until the timeout is reached.
|
||||||
for {
|
//we use a special retrieve function for swap which is optimized for parallel requests
|
||||||
//we use a special retrieve function for swap which is optimized for parallel requests
|
//but does not leave many cascaded requests floating around
|
||||||
//but does not leave many cascaded requests floating around
|
for retrieveForSwap(sim, files) != 0 {
|
||||||
if retrieveForSwap(sim, files) == 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, node := range sim.NodeIDs() {
|
for _, node := range sim.NodeIDs() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue