File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ func TestTransaction_MultiNoErr(t *testing.T) {
260260 err = tx .SQLExec (updateStmt (1 , 10 ))
261261 require .NoError (t , err )
262262 _ , err = tx .Commit (ctx )
263- require .EqualError (t , err , "only one read write transaction allowed at time " )
263+ require .EqualError (t , err , "tx read conflict " )
264264 require .Equal (t , err .(errors.ImmuError ).Code (), errors .CodInFailedSqlTransaction )
265265
266266 txn , err := client .NewTx (ctx )
Original file line number Diff line number Diff line change 4848 ErrNoSessionIDPresent = errors .New ("no sessionID provided" )
4949 ErrTxNotProperlyClosed = errors .New ("tx not properly closed" )
5050 ErrReadWriteTxNotOngoing = errors .New ("read write transaction not ongoing" )
51- ErrOnlyOneReadWriteTxAllowed = errors . New ( "only one read write transaction allowed at time" ).WithCode (errors .CodInFailedSqlTransaction )
51+ ErrTxReadConflict = errors . New ( store . ErrTxReadConflict . Error () ).WithCode (errors .CodInFailedSqlTransaction )
5252)
5353
5454func mapServerError (err error ) error {
@@ -58,7 +58,7 @@ func mapServerError(err error) error {
5858 case store .ErrIllegalArguments :
5959 return ErrIllegalArguments
6060 case store .ErrTxReadConflict :
61- return ErrOnlyOneReadWriteTxAllowed
61+ return ErrTxReadConflict
6262 }
6363 return err
6464}
You can’t perform that action at this time.
0 commit comments