Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

network: fix hive autoconnect param for non-snapshot tests #1846

Merged
merged 1 commit into from
Oct 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions network/stream/cursors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestNodesExchangeCorrectBinIndexes(t *testing.T) {
serviceNameStream: newSyncSimServiceFunc(&SyncSimServiceOptions{
InitialChunkCount: chunkCount,
}),
}, true)
}, false)
defer sim.Close()

_, err := sim.AddNodesAndConnectStar(nodeCount)
Expand Down Expand Up @@ -106,7 +106,7 @@ func TestNodesCorrectBinsDynamic(t *testing.T) {
serviceNameStream: newSyncSimServiceFunc(&SyncSimServiceOptions{
InitialChunkCount: chunkCount,
}),
}, true)
}, false)
defer sim.Close()

_, err := sim.AddNodesAndConnectStar(2)
Expand Down Expand Up @@ -182,7 +182,7 @@ func TestNodeRemovesAndReestablishCursors(t *testing.T) {

sim := simulation.NewBzzInProc(map[string]simulation.ServiceFunc{
serviceNameStream: newSyncSimServiceFunc(nil),
}, true)
}, false)
defer sim.Close()

// load the snapshot
Expand Down Expand Up @@ -310,7 +310,7 @@ func setupReestablishCursorsSimulation(t *testing.T, tagetPO int) (sim *simulati

sim = simulation.NewBzzInProc(map[string]simulation.ServiceFunc{
serviceNameStream: newSyncSimServiceFunc(nil),
}, true)
}, false)

nodeIDs, err := sim.AddNodesAndConnectStar(nodeCount)
if err != nil {
Expand Down Expand Up @@ -501,7 +501,7 @@ func TestCorrectCursorsExchangeRace(t *testing.T) {
}
sim := simulation.NewBzzInProc(map[string]simulation.ServiceFunc{
serviceNameStream: newSyncSimServiceFunc(opts),
}, true)
}, false)
defer sim.Close()

// create the first node with the non mock initialiser
Expand Down
8 changes: 4 additions & 4 deletions network/stream/syncing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func TestTwoNodesSyncWithGaps(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
sim := simulation.NewBzzInProc(map[string]simulation.ServiceFunc{
"bzz-sync": newSyncSimServiceFunc(nil),
}, true)
}, false)
defer sim.Close()
defer catchDuplicateChunkSync(t)()

Expand Down Expand Up @@ -224,7 +224,7 @@ func TestThreeNodesUnionHistoricalSync(t *testing.T) {
chunkCount := 1000
sim := simulation.NewBzzInProc(map[string]simulation.ServiceFunc{
"bzz-sync": newSyncSimServiceFunc(nil),
}, true)
}, false)
defer sim.Close()
union := make(map[string]struct{})
nodeIDs := []enode.ID{}
Expand Down Expand Up @@ -568,7 +568,7 @@ func benchmarkHistoricalStream(b *testing.B, chunks uint64) {
for i := 0; i < b.N; i++ {
sim := simulation.NewBzzInProc(map[string]simulation.ServiceFunc{
"bzz-sync": newSyncSimServiceFunc(nil),
}, true)
}, false)

uploaderNode, err := sim.AddNode()
if err != nil {
Expand Down Expand Up @@ -655,7 +655,7 @@ func TestStarNetworkSyncWithBogusNodes(t *testing.T) {
)
sim := simulation.NewBzzInProc(map[string]simulation.ServiceFunc{
"bzz-sync": newSyncSimServiceFunc(&SyncSimServiceOptions{SyncOnlyWithinDepth: false}),
}, true)
}, false)
defer sim.Close()

ctx, cancel := context.WithTimeout(context.Background(), simTimeout)
Expand Down