Skip to content

Commit

Permalink
don't return wasp errors, they only create noise in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Apr 26, 2024
1 parent 1e14c4f commit 8fba217
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions integration-tests/load/automationv2_1/gun.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,37 +89,16 @@ func (m *LogTriggerGun) Call(_ *wasp.Generator) *wasp.Response {
dividedData = append(dividedData, d[i:end])
}

resultCh := make(chan *wasp.Response, len(dividedData))

for _, a := range dividedData {
wg.Add(1)
go func(a [][]byte, m *LogTriggerGun) {
defer wg.Done()

_, err := contracts.MultiCallLogTriggerLoadGen(m.client, m.multiCallAddress, m.addresses, a)
if err != nil {
m.logger.Error().Err(err).Msg("Error calling MultiCallLogTriggerLoadGen")
resultCh <- &wasp.Response{Error: err.Error(), Failed: true}
return
}
resultCh <- &wasp.Response{}
_, _ = contracts.MultiCallLogTriggerLoadGen(m.client, m.multiCallAddress, m.addresses, a)
}(a, m)
}
wg.Wait()

r := &wasp.Response{}
for result := range resultCh {
if result.Failed {
r.Failed = true
if r.Error != "" {
r.Error += "; " + result.Error
} else {
r.Error = result.Error
}
}
}

close(resultCh)

return r
// we don't really care about errors, we fire and forget and check metrics at the end of the test
return &wasp.Response{}
}

0 comments on commit 8fba217

Please sign in to comment.