Skip to content

Resolve data race in TestCommand_Run

What does this MR do?

Resolve a thread race found by -race.

Why was this MR needed?

This was a rather obvious bug in the code.

You may be wondering why introducing a variable helps. See Go FAQ for an answer: https://golang.org/doc/faq#closures_and_goroutines.

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

Edited by Steve Xuereb

Merge request reports