Closed
Description
Github pipeline unit tests occasionally fail due to Data Race issues.
Examples:
- https://github.com/nginxinc/nginx-gateway-fabric/actions/runs/10908395436/job/30274342711?pr=2568#step:4:5123
- https://github.com/nginxinc/nginx-gateway-fabric/actions/runs/10855036901/job/30126828250?pr=2546#step:4:2771
- https://github.com/nginxinc/nginx-gateway-fabric/actions/runs/10929251093/job/30339638261?pr=2574#step:4:5451
Notes:
Could be related to the parallelization recently added to tests:
- Run tests in parallel #2537
- Run tests in internal/mode/static/state in parallel (1) #2534
- Run tests in internal/mode/static/nginx/config in parallel (2) #2533
- Run tests in internal/mode/static/nginx/config in parallel (1) #2493
- Run tests in internal/framework in parallel (2) #2367
- Run tests in internal/framework in parallel (1) #2362
- Run tests in cmd/ in parallel #2361
May be able to use the go-lang built in race detector: https://go.dev/doc/articles/race_detector