@@ -1145,14 +1145,12 @@ func TestMVCCGCQueueTransactionTable(t *testing.T) {
11451145 txns [strKey ] = * txn
11461146 for _ , addrKey := range []roachpb.Key {baseKey , outsideKey } {
11471147 key := keys .TransactionKey (addrKey , txn .ID )
1148- if err := storage . MVCCPutProto ( ctx , tc . engine , key , hlc. Timestamp {}, txn , storage.MVCCWriteOptions {}); err != nil {
1149- t . Fatal ( err )
1150- }
1148+ require . NoError ( t , storage .MVCCPutProto (
1149+ ctx , tc . stateEng , key , hlc. Timestamp {}, txn , storage. MVCCWriteOptions {},
1150+ ))
11511151 }
11521152 entry := roachpb.AbortSpanEntry {Key : txn .Key , Timestamp : txn .LastActive ()}
1153- if err := tc .repl .abortSpan .Put (ctx , tc .engine , nil , txn .ID , & entry ); err != nil {
1154- t .Fatal (err )
1155- }
1153+ require .NoError (t , tc .repl .abortSpan .Put (ctx , tc .stateEng , nil , txn .ID , & entry ))
11561154 }
11571155
11581156 // Run GC.
@@ -1174,7 +1172,7 @@ func TestMVCCGCQueueTransactionTable(t *testing.T) {
11741172 txnKey := keys .TransactionKey (roachpb .Key (strKey ), txns [strKey ].ID )
11751173 txnTombstoneTSCacheKey := transactionTombstoneMarker (
11761174 roachpb .Key (strKey ), txns [strKey ].ID )
1177- ok , err := storage .MVCCGetProto (ctx , tc .engine , txnKey , hlc.Timestamp {}, txn ,
1175+ ok , err := storage .MVCCGetProto (ctx , tc .stateEng , txnKey , hlc.Timestamp {}, txn ,
11781176 storage.MVCCGetOptions {})
11791177 if err != nil {
11801178 return err
@@ -1238,11 +1236,9 @@ func TestMVCCGCQueueTransactionTable(t *testing.T) {
12381236 "but only %d are left" , exp , count )
12391237 }
12401238
1241- batch := tc .engine .NewSnapshot ()
1242- defer batch .Close ()
12431239 tc .repl .raftMu .Lock ()
12441240 tc .repl .mu .RLock ()
1245- tc .repl .assertStateRaftMuLockedReplicaMuRLocked (ctx , batch ) // check that in-mem and on-disk state were updated
1241+ tc .repl .assertStateRaftMuLockedReplicaMuRLocked (ctx , tc . stateEng , tc . raftEng ) // check that in-mem and on-disk state were updated
12461242 tc .repl .mu .RUnlock ()
12471243 tc .repl .raftMu .Unlock ()
12481244}
@@ -1349,9 +1345,9 @@ func TestMVCCGCQueueLastProcessedTimestamps(t *testing.T) {
13491345
13501346 ts := tc .Clock ().Now ()
13511347 for _ , lpv := range lastProcessedVals {
1352- if err := storage . MVCCPutProto ( ctx , tc . engine , lpv . key , hlc. Timestamp {}, & ts , storage.MVCCWriteOptions {}); err != nil {
1353- t . Fatal ( err )
1354- }
1348+ require . NoError ( t , storage .MVCCPutProto (
1349+ ctx , tc . stateEng , lpv . key , hlc. Timestamp {}, & ts , storage. MVCCWriteOptions {},
1350+ ))
13551351 }
13561352
13571353 confReader , err := tc .store .GetConfReader (ctx )
@@ -1370,7 +1366,7 @@ func TestMVCCGCQueueLastProcessedTimestamps(t *testing.T) {
13701366 // Verify GC.
13711367 testutils .SucceedsSoon (t , func () error {
13721368 for _ , lpv := range lastProcessedVals {
1373- ok , err := storage .MVCCGetProto (ctx , tc .engine , lpv .key , hlc.Timestamp {}, & ts ,
1369+ ok , err := storage .MVCCGetProto (ctx , tc .stateEng , lpv .key , hlc.Timestamp {}, & ts ,
13741370 storage.MVCCGetOptions {})
13751371 if err != nil {
13761372 return err
0 commit comments