diff --git a/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs index a82f9b1a6c..fcc6c41d30 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs @@ -82,5 +82,23 @@ namespace OpenSim.Region.Environment.Scenes.Tests Assert.That(presence, Is.Not.Null, "presence is null"); Assert.That(presence.Firstname, Is.EqualTo(firstName), "First name not same"); } + + /// + /// Test removing an uncrossed root agent from a scene. + /// + [Test] + public void TestRemoveRootAgent() + { + Scene scene = SceneTestUtils.SetupScene(); + UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); + + SceneTestUtils.AddRootAgent(scene, agentId); + + scene.RemoveClient(agentId); + + ScenePresence presence = scene.GetScenePresence(agentId); + + Assert.That(presence, Is.Null, "presence is not null"); + } } } diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs index 2b2a114412..1cdd32cf88 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs @@ -52,8 +52,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests AgentCircuitManager acm = new AgentCircuitManager(); CommunicationsManager cm = new TestCommunicationsManager(); - //SceneCommunicationService scs = new SceneCommunicationService(cm); - SceneCommunicationService scs = null; + SceneCommunicationService scs = new SceneCommunicationService(cm); StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", ""); BaseHttpServer httpServer = new BaseHttpServer(666); IConfigSource configSource = new IniConfigSource();