* This should fix the tests failing because of a MainConsole.Instance null reference
* Added a MockConsole that doesn't require a handle to System.Consoleslimupdates2
parent
34d882b70d
commit
f005e570aa
|
@ -0,0 +1,32 @@
|
||||||
|
using System;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Framework.Console
|
||||||
|
{
|
||||||
|
public class MockConsole : CommandConsole
|
||||||
|
{
|
||||||
|
public MockConsole(string defaultPrompt) : base(defaultPrompt)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public override void Output(string text)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public override void Output(string text, string level)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ReadLine(string p, bool isCommand, bool e)
|
||||||
|
{
|
||||||
|
//Thread.CurrentThread.Join(1000);
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
public override void UnlockOutput()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public override void LockOutput()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -142,7 +142,7 @@ namespace OpenSim.Tests.Common.Setup
|
||||||
//{
|
//{
|
||||||
// System.Console.WriteLine("Starting a brand new scene");
|
// System.Console.WriteLine("Starting a brand new scene");
|
||||||
// newScene = true;
|
// newScene = true;
|
||||||
// MainConsole.Instance = new LocalConsole("TEST PROMPT");
|
MainConsole.Instance = new MockConsole("TEST PROMPT");
|
||||||
// MainServer.Instance = new BaseHttpServer(980);
|
// MainServer.Instance = new BaseHttpServer(980);
|
||||||
// commsManager = cm;
|
// commsManager = cm;
|
||||||
//}
|
//}
|
||||||
|
@ -204,7 +204,7 @@ namespace OpenSim.Tests.Common.Setup
|
||||||
m_inventoryService.PostInitialise();
|
m_inventoryService.PostInitialise();
|
||||||
m_assetService.PostInitialise();
|
m_assetService.PostInitialise();
|
||||||
m_userAccountService.PostInitialise();
|
m_userAccountService.PostInitialise();
|
||||||
|
testScene.RegionInfo.EstateSettings.EstateOwner = UUID.Random();
|
||||||
testScene.SetModuleInterfaces();
|
testScene.SetModuleInterfaces();
|
||||||
|
|
||||||
testScene.LandChannel = new TestLandChannel(testScene);
|
testScene.LandChannel = new TestLandChannel(testScene);
|
||||||
|
|
Loading…
Reference in New Issue