File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ func TestLongRunningReplication(t *testing.T) {
3434 net .StopAndAssert (false )
3535}
3636
37- // Oh shoot, aws crashed node 3. will they recover....
3837func TestLongRunningCrash (t * testing.T ) {
3938 net := testutil .NewDefaultLongRunningNetwork (t , 10 )
4039 for i , instance := range net .Instances {
Original file line number Diff line number Diff line change @@ -71,9 +71,10 @@ func (n *LongRunningInMemoryNetwork) CrashNodes(nodeIndexes ...uint64) {
7171
7272func (n * LongRunningInMemoryNetwork ) RestartNodes (nodeIndexes ... uint64 ) {
7373 for _ , idx := range nodeIndexes {
74+ n .lock .Lock ()
7475 instance := n .Instances [idx ]
76+
7577 nodeID := instance .E .ID
76- logger := instance .l
7778 bb := instance .BB
7879 clonedWal := instance .WAL .Clone ()
7980 clonedStorage := instance .Storage .Clone ()
@@ -82,13 +83,14 @@ func (n *LongRunningInMemoryNetwork) RestartNodes(nodeIndexes ...uint64) {
8283 BlockBuilder : bb ,
8384 ReplicationEnabled : true ,
8485 MaxRoundWindow : longRunningMaxRoundWindow ,
85- Logger : logger ,
86+ Logger : instance . l ,
8687 WAL : clonedWal ,
8788 Storage : clonedStorage ,
8889 StartTime : instance .currentTime .Load (),
8990 })
9091
9192 n .Instances [idx ] = newNode
93+ n .lock .Unlock ()
9294 newNode .Start ()
9395 }
9496}
You can’t perform that action at this time.
0 commit comments