From 0007711eb5947d292f10325dd4af640ece79ea2d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 1 Mar 2012 03:23:10 +0000 Subject: Use a fully stubbed out MockConsole for unit tests rather than inheriting from CommandConsole. This is so that the static MainConsole.Instance doesn't retain references to methods registered by scene and other modules to service commands. This prevents the scene from being garbage collected at the end of a test. This is not the final thing preventing GC - next up is the timer started by SimStatsReporter that holds a reference to Scene that prevents end of test gc. --- OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Tests') diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index aa904aa..8a69d7c 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -113,7 +113,7 @@ namespace OpenSim.Tests.Common Console.WriteLine("Setting up test scene {0}", name); // We must set up a console otherwise setup of some modules may fail - MainConsole.Instance = new MockConsole("TEST PROMPT"); + MainConsole.Instance = new MockConsole(); RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); regInfo.RegionName = name; -- cgit v1.1