Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run functional and NFR tests with --race #1857

Open
lucacome opened this issue Apr 19, 2024 · 0 comments
Open

Run functional and NFR tests with --race #1857

lucacome opened this issue Apr 19, 2024 · 0 comments
Labels
tests Pull requests that update tests
Milestone

Comments

@lucacome
Copy link
Member

lucacome commented Apr 19, 2024

As a maintainer of NGF
I want to run my tests with --race
So that I can catch errors in my tests that may result in inconsistent failures/successes

Acceptance

  • NGF functional tests are run with the --race flag
  • All tests pass consistently.

Running the tests with --race results in


==================
WARNING: DATA RACE
Write at 0x00c0004716d0 by goroutine 97:
  bytes.(*Buffer).Write()
      /opt/hostedtoolcache/go/1.22.2/x64/src/bytes/buffer.go:176 +0x3d
  fmt.Fprintf()
      /opt/hostedtoolcache/go/1.22.2/x64/src/fmt/print.go:225 +0xab
  k8s.io/client-go/tools/portforward.(*PortForwarder).handleConnection()
      /home/runner/go/pkg/mod/k8s.io/client-go@v0.29.3/tools/portforward/portforward.go:[33](https://github.com/nginxinc/nginx-gateway-fabric/actions/runs/8715168312/job/23906995652?pr=1833#step:13:34)5 +0x19d
  k8s.io/client-go/tools/portforward.(*PortForwarder).waitForConnection.gowrap1()
      /home/runner/go/pkg/mod/k8s.io/client-go@v0.29.3/tools/portforward/portforward.go:316 +0x6b

Previous write at 0x00c0004716d0 by goroutine 52:
  bytes.(*Buffer).Write()
      /opt/hostedtoolcache/go/1.22.2/x64/src/bytes/buffer.go:176 +0x3d
  fmt.Fprintf()
      /opt/hostedtoolcache/go/1.22.2/x64/src/fmt/print.go:225 +0xab
  k8s.io/client-go/tools/portforward.(*PortForwarder).getListener()
      /home/runner/go/pkg/mod/k8s.io/client-go@v0.29.3/tools/portforward/portforward.go:294 +0x728
  k8s.io/client-go/tools/portforward.(*PortForwarder).listenOnPortAndAddress()
      /home/runner/go/pkg/mod/k8s.io/client-go@v0.29.3/tools/portforward/portforward.go:268 +0x8b
  k8s.io/client-go/tools/portforward.(*PortForwarder).listenOnPort()
      /home/runner/go/pkg/mod/k8s.io/client-go@v0.29.3/tools/portforward/portforward.go:248 +0x22b
  k8s.io/client-go/tools/portforward.(*PortForwarder).forward()
      /home/runner/go/pkg/mod/k8s.io/client-go@v0.29.3/tools/portforward/portforward.go:212 +0xcd
  k8s.io/client-go/tools/portforward.(*PortForwarder).ForwardPorts()
      /home/runner/go/pkg/mod/k8s.io/client-go@v0.29.3/tools/portforward/portforward.go:200 +0x329
  github.com/nginxinc/nginx-gateway-fabric/tests/framework.PortForward.func1()
      /home/runner/work/nginx-gateway-fabric/nginx-gateway-fabric/tests/framework/portforward.go:45 +0x2e

Goroutine 97 (running) created at:
  k8s.io/client-go/tools/portforward.(*PortForwarder).waitForConnection()
      /home/runner/go/pkg/mod/k8s.io/client-go@v0.29.3/tools/portforward/portforward.go:316 +0x84
  k8s.io/client-go/tools/portforward.(*PortForwarder).listenOnPortAndAddress.gowrap1()
      /home/runner/go/pkg/mod/k8s.io/client-go@v0.29.3/tools/portforward/portforward.go:273 +0x6b

Goroutine 52 (running) created at:
  github.com/nginxinc/nginx-gateway-fabric/tests/framework.PortForward()
      /home/runner/work/nginx-gateway-fabric/nginx-gateway-fabric/tests/framework/portforward.go:[44](https://github.com/nginxinc/nginx-gateway-fabric/actions/runs/8715168312/job/23906995652?pr=1833#step:13:45) +0x819
  github.com/nginxinc/nginx-gateway-fabric/tests/suite.setup()
      /home/runner/work/nginx-gateway-fabric/nginx-gateway-fabric/tests/suite/system_suite_test.go:180 +0x1ba8
  github.com/nginxinc/nginx-gateway-fabric/tests/suite.init.func4()
      /home/runner/work/nginx-gateway-fabric/nginx-gateway-fabric/tests/suite/system_suite_test.go:258 +0x2c4
  github.com/onsi/ginkgo/v2/internal.extractBodyFunction.func3()
      /home/runner/go/pkg/mod/github.com/onsi/ginkgo/v2@v2.17.1/internal/node.go:[47](https://github.com/nginxinc/nginx-gateway-fabric/actions/runs/8715168312/job/23906995652?pr=1833#step:13:48)2 +0x2e
  github.com/onsi/ginkgo/v2/internal.(*Suite).runNode.func3()
      /home/runner/go/pkg/mod/github.com/onsi/ginkgo/v2@v2.17.1/internal/suite.go:889 +0x12b
==================
@mpstefan mpstefan added the tests Pull requests that update tests label Apr 22, 2024
@mpstefan mpstefan added this to the v1.3.0 milestone Apr 22, 2024
@mpstefan mpstefan modified the milestones: v1.3.0, v1.4.0 May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Pull requests that update tests
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants