* Extend sog delete to inventory test to crank the normally async sog deleter by hand
* After the crank, assert that the object has now been removed from the scene0.6.1-post-fixes
parent
ecac5c9c5a
commit
02105c9c2a
|
@ -114,7 +114,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool InventoryDeQueueAndDelete()
|
/// <summary>
|
||||||
|
/// Move the next object in the queue to inventory. Then delete it properly from the scene.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool InventoryDeQueueAndDelete()
|
||||||
{
|
{
|
||||||
DeleteToInventoryHolder x = null;
|
DeleteToInventoryHolder x = null;
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,11 @@ namespace OpenSim.Region.Environment.Scenes.Tests
|
||||||
UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
|
UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
|
||||||
|
|
||||||
TestScene scene = SceneTestUtils.SetupScene();
|
TestScene scene = SceneTestUtils.SetupScene();
|
||||||
|
|
||||||
|
// Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
|
||||||
|
AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
|
||||||
|
sogd.Enabled = false;
|
||||||
|
|
||||||
SceneObjectPart part = SceneTestUtils.AddSceneObject(scene);
|
SceneObjectPart part = SceneTestUtils.AddSceneObject(scene);
|
||||||
|
|
||||||
IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId);
|
IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId);
|
||||||
|
@ -99,6 +104,12 @@ namespace OpenSim.Region.Environment.Scenes.Tests
|
||||||
|
|
||||||
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
|
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
|
||||||
Assert.That(retrievedPart, Is.Not.Null);
|
Assert.That(retrievedPart, Is.Not.Null);
|
||||||
|
|
||||||
|
sogd.InventoryDeQueueAndDelete();
|
||||||
|
SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId);
|
||||||
|
Assert.That(retrievedPart2, Is.Null);
|
||||||
|
|
||||||
|
// TODO: test that the object actually made it successfully into inventory
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue