fix: concurrent map writes in load testing

This commit is contained in:
debugtalk
2021-12-30 13:15:04 +08:00
parent 3b49d7a5fc
commit 345f8c0038
2 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -53,12 +53,13 @@ func (b *hrpBoomer) Run(testcases ...ITestCase) {
func (b *hrpBoomer) convertBoomerTask(testcase *TestCase) *boomer.Task {
hrpRunner := NewRunner(nil).SetDebug(b.debug)
runner := hrpRunner.newCaseRunner(testcase)
config := testcase.Config.ToStruct()
return &boomer.Task{
Name: config.Name,
Weight: config.Weight,
Fn: func() {
runner := hrpRunner.newCaseRunner(testcase)
testcaseSuccess := true // flag whole testcase result
var transactionSuccess = true // flag current transaction result