Commit 82deb40
committed
*: stop leaking (most) etcd procs
The majority of usages of `RedpandaTestEnv` leak `etcd` and `kube-apiserver`
processes. This slowly bogs down machines running tests as part of their
development loop.
The ideal fix would be to plumb a testing.T into it and hook into cleanup but
the widespread usage makes refactoring quite tedious.
This commit instead attaches a finalizer to the returned `*rest.Config` which
drops the leaked procs by > 50% (~10 leaks vs ~30). The leakage will vary
across runs and is made worse by test failures. Never the less this is an
improvement.1 parent ab440ae commit 82deb40
File tree
2 files changed
+13
-0
lines changed- operator/internal/testutils
- pkg/kube
2 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
47 | 58 | | |
48 | 59 | | |
49 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
0 commit comments