mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
swarm: used snapshots for swap tests
This commit is contained in:
parent
ab9556dfe5
commit
354f577f1a
1 changed files with 4 additions and 4 deletions
|
|
@ -101,12 +101,11 @@ func TestSwapNetworkSymmetricFileUpload(t *testing.T) {
|
||||||
var nodeStatusM sync.Map
|
var nodeStatusM sync.Map
|
||||||
var totalFoundCount uint64
|
var totalFoundCount uint64
|
||||||
|
|
||||||
//connect all nodes in a chain
|
//upload a snapshot
|
||||||
_, err := sim.AddNodesAndConnectChain(nodeCount)
|
err := sim.UploadSnapshot(fmt.Sprintf("network/stream/testing/snapshot_%d.json", nodeCount))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
//run the simulation
|
//run the simulation
|
||||||
result := sim.Run(ctx, func(ctx context.Context, sim *simulation.Simulation) error {
|
result := sim.Run(ctx, func(ctx context.Context, sim *simulation.Simulation) error {
|
||||||
//wait for kademlia to be healthy
|
//wait for kademlia to be healthy
|
||||||
|
|
@ -276,7 +275,8 @@ func TestSwapNetworkAsymmetricFileUpload(t *testing.T) {
|
||||||
var nodeStatusM sync.Map
|
var nodeStatusM sync.Map
|
||||||
var totalFoundCount uint64
|
var totalFoundCount uint64
|
||||||
|
|
||||||
_, err := sim.AddNodesAndConnectChain(nodeCount)
|
//upload a snapshot
|
||||||
|
err := sim.UploadSnapshot(fmt.Sprintf("network/stream/testing/snapshot_%d.json", nodeCount))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue