Skip to content

Commit

Permalink
syslog tests: cleanup subprocess (#29401)
Browse files Browse the repository at this point in the history
**Description:**
Fixes a flake issue where one collector subprocess isn't torn down
before the next test run:

```
2023-11-20T19:30:42.822Z	error	[email protected]/collector.go:255	Asynchronous error received, terminating process	{"error": "listen tcp :8888: bind: address already in use"}
```

**Testing:**
Adds asserted case cleanup.

**Documentation:**
none needed
  • Loading branch information
rmfitzpatrick authored Nov 20, 2023
1 parent 399a74b commit 1ed0da4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions testbed/tests/syslog_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ service:
})
require.NoError(t, err)

t.Cleanup(func() {
stopped, e := collector.Stop()
require.NoError(t, e)
require.True(t, stopped)
})

// prepare data

message := ""
Expand Down

0 comments on commit 1ed0da4

Please sign in to comment.