mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-10-20 19:52:06 +00:00
#862 caused a **new** data race in its mock testing while fixing `setJobResult`'s data race. 🤣 I'm going backwards! ``` ================== WARNING: DATA RACE Read at 0x00c000168d88 by goroutine 943: code.forgejo.org/forgejo/runner/v9/act/model.(*Workflow).GetJob() /home/debian/.cache/act/8afb5309fced9ef8/hostexecutor/act/model/workflow.go:742 +0x244 code.forgejo.org/forgejo/runner/v9/act/model.(*Run).Job() /home/debian/.cache/act/8afb5309fced9ef8/hostexecutor/act/model/planner.go:50 +0xab code.forgejo.org/forgejo/runner/v9/act/runner.setJobResult() /home/debian/.cache/act/8afb5309fced9ef8/hostexecutor/act/runner/job_executor.go:166 +0x7c code.forgejo.org/forgejo/runner/v9/act/runner.TestSetJobResultConcurrency.func2() /home/debian/.cache/act/8afb5309fced9ef8/hostexecutor/act/runner/job_executor_test.go:404 +0xfb Previous write at 0x00c000168d88 by goroutine 944: code.forgejo.org/forgejo/runner/v9/act/model.(*Workflow).GetJob() /home/debian/.cache/act/8afb5309fced9ef8/hostexecutor/act/model/workflow.go:743 +0x258 code.forgejo.org/forgejo/runner/v9/act/model.(*Run).Job() /home/debian/.cache/act/8afb5309fced9ef8/hostexecutor/act/model/planner.go:50 +0xab code.forgejo.org/forgejo/runner/v9/act/runner.setJobResult() /home/debian/.cache/act/8afb5309fced9ef8/hostexecutor/act/runner/job_executor.go:166 +0x7c code.forgejo.org/forgejo/runner/v9/act/runner.TestSetJobResultConcurrency.func3() /home/debian/.cache/act/8afb5309fced9ef8/hostexecutor/act/runner/job_executor_test.go:409 +0xf8 ... ================== ``` <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - other - [PR](https://code.forgejo.org/forgejo/runner/pulls/869): <!--number 869 --><!--line 0 --><!--description dGVzdDogZml4IGRhdGEgcmFjZSB0cmlnZ2VyZWQgYnkgdGVzdGluZyBtb2NrcyBpbiBUZXN0U2V0Sm9iUmVzdWx0Q29uY3VycmVuY3k=-->test: fix data race triggered by testing mocks in TestSetJobResultConcurrency<!--description--> <!--end release-notes-assistant--> Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/869 Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net> Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net> |
||
---|---|---|
.. | ||
artifactcache | ||
cacheproxy | ||
common | ||
container | ||
exprparser | ||
filecollector | ||
jobparser | ||
lookpath | ||
model | ||
runner | ||
schema | ||
workflowpattern |