From bbab3f11b034f6bc72628e97e86ce9beeac1eeb3 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 22 Dec 2021 11:19:06 +0100 Subject: [PATCH] Only start needed modules for tests --- core/pmtesting/testing.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/pmtesting/testing.go b/core/pmtesting/testing.go index fdfff913..086ae2da 100644 --- a/core/pmtesting/testing.go +++ b/core/pmtesting/testing.go @@ -53,7 +53,10 @@ func TestMain(m *testing.M, module *modules.Module) { // afterStartFn after modules have started and beforeStopFn before modules // are shutdown. func TestMainWithHooks(m *testing.M, module *modules.Module, afterStartFn, beforeStopFn TestHookFunc) { - // enable module for testing + // Only enable needed modules. + modules.EnableModuleManagement(nil) + + // Enable this module for testing. if module != nil { module.Enable() }