File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1385,7 +1385,9 @@ func TestNRGTruncateWALRevertsUncommittedAddPeer(t *testing.T) {
13851385 require_False (t , gz .Peers [newPeer ].Known )
13861386
13871387 // Truncate the uncommitted AddPeer entry. Its speculative effects must be reverted.
1388+ n .Lock ()
13881389 n .truncateWAL (1 , 1 )
1390+ n .Unlock ()
13891391 require_Equal (t , n .pindex , 1 )
13901392 _ , ok = n .peers [newPeer ]
13911393 require_False (t , ok )
@@ -1463,7 +1465,9 @@ func TestNRGTruncateWALRevertsUncommittedRemovePeer(t *testing.T) {
14631465 require_True (t , gz .Peers [nats0 ].Known )
14641466
14651467 // Truncate the uncommitted RemovePeer entry. Its speculative effects must be reverted.
1468+ n .Lock ()
14661469 n .truncateWAL (1 , 1 )
1470+ n .Unlock ()
14671471 _ , ok = n .peers [oldPeer ]
14681472 require_True (t , ok )
14691473 require_Equal (t , n .csz , 3 )
You can’t perform that action at this time.
0 commit comments