Skip to content

Commit 7af52e3

Browse files
authored
TestKit allow maxTxRetryTimeMs to be nil (#347)
1 parent cd93c8f commit 7af52e3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

testkit-backend/backend.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,8 @@ func (b *backend) handleRequest(req map[string]interface{}) {
400400
if data["maxConnectionPoolSize"] != nil {
401401
c.MaxConnectionPoolSize = int(data["maxConnectionPoolSize"].(float64))
402402
}
403-
rawMaxTxRetryTime, found := data["maxTxRetryTimeMs"]
404-
if found {
405-
maxTxRetryTime := int(rawMaxTxRetryTime.(float64))
403+
if data["maxTxRetryTimeMs"] != nil {
404+
maxTxRetryTime := int(data["maxTxRetryTimeMs"].(float64))
406405
c.MaxTransactionRetryTime = time.Millisecond * time.Duration(maxTxRetryTime)
407406
}
408407
if data["fetchSize"] != nil {

0 commit comments

Comments
 (0)