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

Integration tests do not clean up properly #2607

Open
ccressent opened this issue Jan 16, 2019 · 0 comments
Open

Integration tests do not clean up properly #2607

ccressent opened this issue Jan 16, 2019 · 0 comments
Labels
bug component:ci Sensu Go build, test, and CI pipeline improvements testing

Comments

@ccressent
Copy link
Contributor

Integration tests do not appear to clean up properly after being run, leading to various issues.

Current Behavior

  • After certain integration tests run, about 130MB of etcd state is left in a /tmp/sensu* directory. This can slowly fill up /tmp and lead to strange system behaviour (Slack crash, test failures, ...).

  • After certain integration tests run, a subsequent test may be unable to open a new gRPC connection, leading to test timeouts and/or failure.

Expected Behavior

  • Tests clean up after themselves, leaving nothing behind and returning to the same state as before they were run.
  • Back to back integration tests work instead of timing out.

Steps to Reproduce (for bugs)

The keepalived package can be used to reproduce both issues:

$ cd backend/keepalived
$ GOCACHE=off go test -tags=integration -v .
$ ls /tmp/sensu*
$ du -hs /tmp/sensu*

In backend/keepalived/integration_test.go, duplicate the TestKeepaliveMonitor() function so that 2 identical integration tests run back to back.

$ GOCACHE=off go test -tags=integration -v .

After the first test run, the second, identical test will be stuck with repeating error messages:

WARNING: 2019/01/16 10:32:35 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:43657: connect: connection refused"; Reconnecting to {127.0.0.1:43657 0  <nil>}

Your Environment

  • Sensu version used (sensuctl, sensu-backend, and/or sensu-agent):
  • Installation method: git
  • Operating System: Arch Linux, kernel 4.19
@calebhailey calebhailey added the component:ci Sensu Go build, test, and CI pipeline improvements label May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component:ci Sensu Go build, test, and CI pipeline improvements testing
Projects
None yet
Development

No branches or pull requests

2 participants