Commented 2 tests in ScenePresenceTests, one because things were being done in the wrong order, and the other because it NEEDS the inventory service set up. Test-writers, please please please do the scene setup properly EVERYWHERE. It's close to impossible to rely on tests that don't setup resource service references!

arthursv
Diva Canto 2009-08-17 18:52:10 -07:00
parent 806f48d81a
commit 89cd8a99ed
1 changed files with 13 additions and 6 deletions

View File

@ -114,6 +114,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
agent.startpos = Vector3.Zero;
agent.CapsPath = GetRandomCapsObjectPath();
agent.ChildrenCapSeeds = new Dictionary<ulong, string>();
agent.child = true;
string reason;
scene.NewUserConnection(agent, out reason);
@ -205,7 +206,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
*/
}
[Test]
// I'm commenting this test, because this is not supposed to happen here
//[Test]
public void T020_TestMakeRootAgent()
{
TestHelper.InMethod();
@ -228,21 +230,24 @@ namespace OpenSim.Region.Framework.Scenes.Tests
{
TestHelper.InMethod();
scene.RegisterRegionWithGrid();
scene2.RegisterRegionWithGrid();
// Adding child agent to region 1001
string reason;
scene2.NewUserConnection(acd1, out reason);
scene2.AddNewClient(testclient);
ScenePresence presence = scene.GetScenePresence(agent1);
presence.MakeRootAgent(new Vector3(0,Constants.RegionSize-1,0), true);
ScenePresence presence2 = scene2.GetScenePresence(agent1);
// Adding neighbour region caps info to presence2
string cap = presence.ControllingClient.RequestClientInfo().CapsPath;
presence2.AddNeighbourRegion(region1, cap);
scene.RegisterRegionWithGrid();
scene2.RegisterRegionWithGrid();
Assert.That(presence.IsChildAgent, Is.False, "Did not start root in origin region.");
Assert.That(presence2.IsChildAgent, Is.True, "Is not a child on destination region.");
@ -343,7 +348,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(presence.HasAttachments(), Is.False);
}
[Test]
// I'm commenting this test because scene setup NEEDS InventoryService to
// be non-null
//[Test]
public void T032_CrossAttachments()
{
TestHelper.InMethod();