aboutsummaryrefslogtreecommitdiff
path: root/setup/base
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2023-01-20 12:45:56 +0100
committerGitHub <noreply@github.com>2023-01-20 12:45:56 +0100
commitce2bfc3f2e507a012044906af7f25c9dc52873d7 (patch)
treedbfc33abaa3e03cff17886d085b45869ad81df44 /setup/base
parent738686ae686004c5efa9fe2096502cdc426c6dd8 (diff)
Make tests more reliable (#2948)
When using `testrig.CreateBase` and then using that base for other `NewInternalAPI` calls, we never actually shutdown the components. `testrig.CreateBase` returns a `close` function, which only removes the database, so still running components have issues connecting to the database, since we ripped it out underneath it - which can result in "Disk I/O" or "pq deadlock detected" issues.
Diffstat (limited to 'setup/base')
-rw-r--r--setup/base/base.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/setup/base/base.go b/setup/base/base.go
index d3adbf53..ff38209f 100644
--- a/setup/base/base.go
+++ b/setup/base/base.go
@@ -264,6 +264,8 @@ func NewBaseDendrite(cfg *config.Dendrite, componentName string, options ...Base
// Close implements io.Closer
func (b *BaseDendrite) Close() error {
+ b.ProcessContext.ShutdownDendrite()
+ b.ProcessContext.WaitForShutdown()
return b.tracerCloser.Close()
}