diff options
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
6 files changed, 34 insertions, 31 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs index 3b0e77f..fc66c85 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
44 | { | 44 | { |
45 | [TestFixture, LongRunning] | 45 | [TestFixture, LongRunning] |
46 | public class EntityManagerTests | 46 | public class EntityManagerTests |
47 | { | 47 | { |
48 | static public Random random; | 48 | static public Random random; |
49 | SceneObjectGroup found; | 49 | SceneObjectGroup found; |
50 | Scene scene = SceneSetupHelpers.SetupScene(); | 50 | Scene scene = SceneSetupHelpers.SetupScene(); |
@@ -81,13 +81,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
81 | 81 | ||
82 | Assert.That(entman.ContainsKey(obj1), Is.False); | 82 | Assert.That(entman.ContainsKey(obj1), Is.False); |
83 | Assert.That(entman.ContainsKey(li1), Is.False); | 83 | Assert.That(entman.ContainsKey(li1), Is.False); |
84 | Assert.That(entman.ContainsKey(obj2), Is.False); | 84 | Assert.That(entman.ContainsKey(obj2), Is.False); |
85 | Assert.That(entman.ContainsKey(li2), Is.False); | 85 | Assert.That(entman.ContainsKey(li2), Is.False); |
86 | } | 86 | } |
87 | 87 | ||
88 | [Test] | 88 | [Test] |
89 | public void T011_ThreadAddRemoveTest() | 89 | public void T011_ThreadAddRemoveTest() |
90 | { | 90 | { |
91 | TestHelper.InMethod(); | 91 | TestHelper.InMethod(); |
92 | // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); | 92 | // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); |
93 | 93 | ||
@@ -148,12 +148,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
148 | int size = random.Next(40,80); | 148 | int size = random.Next(40,80); |
149 | char ch ; | 149 | char ch ; |
150 | for (int i=0; i<size; i++) | 150 | for (int i=0; i<size; i++) |
151 | { | 151 | { |
152 | ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ; | 152 | ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ; |
153 | name.Append(ch); | 153 | name.Append(ch); |
154 | } | 154 | } |
155 | return name.ToString(); | 155 | return name.ToString(); |
156 | } | 156 | } |
157 | } | 157 | } |
158 | 158 | ||
159 | public class NewTestThreads | 159 | public class NewTestThreads |
@@ -179,4 +179,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
179 | entman.Remove(sog.UUID); | 179 | entman.Remove(sog.UUID); |
180 | } | 180 | } |
181 | } | 181 | } |
182 | } \ No newline at end of file | 182 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs index f6737a5..5c9e66f 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using NUnit.Framework; | 29 | using NUnit.Framework; |
30 | using OpenMetaverse; | 30 | using OpenMetaverse; |
31 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
32 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
32 | 33 | ||
33 | namespace OpenSim.Region.Framework.Scenes.Tests | 34 | namespace OpenSim.Region.Framework.Scenes.Tests |
34 | { | 35 | { |
@@ -65,7 +66,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
65 | throw new NotImplementedException(); | 66 | throw new NotImplementedException(); |
66 | } | 67 | } |
67 | 68 | ||
68 | public override bool OtherRegionUp(RegionInfo thisRegion) | 69 | public override void OtherRegionUp(GridRegion otherRegion) |
69 | { | 70 | { |
70 | throw new NotImplementedException(); | 71 | throw new NotImplementedException(); |
71 | } | 72 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index 105446d..0ed00de 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | |||
@@ -46,13 +46,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
46 | /// </summary> | 46 | /// </summary> |
47 | [TestFixture] | 47 | [TestFixture] |
48 | public class SceneObjectBasicTests | 48 | public class SceneObjectBasicTests |
49 | { | 49 | { |
50 | /// <summary> | 50 | /// <summary> |
51 | /// Test adding an object to a scene. | 51 | /// Test adding an object to a scene. |
52 | /// </summary> | 52 | /// </summary> |
53 | [Test, LongRunning] | 53 | [Test, LongRunning] |
54 | public void TestAddSceneObject() | 54 | public void TestAddSceneObject() |
55 | { | 55 | { |
56 | TestHelper.InMethod(); | 56 | TestHelper.InMethod(); |
57 | 57 | ||
58 | Scene scene = SceneSetupHelpers.SetupScene(); | 58 | Scene scene = SceneSetupHelpers.SetupScene(); |
@@ -61,7 +61,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
61 | 61 | ||
62 | //m_log.Debug("retrievedPart : {0}", retrievedPart); | 62 | //m_log.Debug("retrievedPart : {0}", retrievedPart); |
63 | // If the parts have the same UUID then we will consider them as one and the same | 63 | // If the parts have the same UUID then we will consider them as one and the same |
64 | Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID)); | 64 | Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID)); |
65 | } | 65 | } |
66 | 66 | ||
67 | /// <summary> | 67 | /// <summary> |
@@ -72,11 +72,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
72 | { | 72 | { |
73 | TestHelper.InMethod(); | 73 | TestHelper.InMethod(); |
74 | 74 | ||
75 | TestScene scene = SceneSetupHelpers.SetupScene(); | 75 | TestScene scene = SceneSetupHelpers.SetupScene(); |
76 | SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene); | 76 | SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene); |
77 | scene.DeleteSceneObject(part.ParentGroup, false); | 77 | scene.DeleteSceneObject(part.ParentGroup, false); |
78 | 78 | ||
79 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); | 79 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); |
80 | Assert.That(retrievedPart, Is.Null); | 80 | Assert.That(retrievedPart, Is.Null); |
81 | } | 81 | } |
82 | 82 | ||
@@ -115,19 +115,19 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
115 | //[Test] | 115 | //[Test] |
116 | //public void TestDeleteSceneObjectAsyncToUserInventory() | 116 | //public void TestDeleteSceneObjectAsyncToUserInventory() |
117 | //{ | 117 | //{ |
118 | // TestHelper.InMethod(); | 118 | // TestHelper.InMethod(); |
119 | // //log4net.Config.XmlConfigurator.Configure(); | 119 | // //log4net.Config.XmlConfigurator.Configure(); |
120 | 120 | ||
121 | // UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); | 121 | // UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); |
122 | // string myObjectName = "Fred"; | 122 | // string myObjectName = "Fred"; |
123 | 123 | ||
124 | // TestScene scene = SceneSetupHelpers.SetupScene(); | 124 | // TestScene scene = SceneSetupHelpers.SetupScene(); |
125 | // SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene, myObjectName); | 125 | // SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene, myObjectName); |
126 | 126 | ||
127 | // Assert.That( | 127 | // Assert.That( |
128 | // scene.CommsManager.UserAdminService.AddUser( | 128 | // scene.CommsManager.UserAdminService.AddUser( |
129 | // "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId), | 129 | // "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId), |
130 | // Is.EqualTo(agentId)); | 130 | // Is.EqualTo(agentId)); |
131 | 131 | ||
132 | // IClientAPI client = SceneSetupHelpers.AddRootAgent(scene, agentId); | 132 | // IClientAPI client = SceneSetupHelpers.AddRootAgent(scene, agentId); |
133 | 133 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index e74b18e..b3d10df 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
45 | /// <summary> | 45 | /// <summary> |
46 | /// Linking tests | 46 | /// Linking tests |
47 | /// </summary> | 47 | /// </summary> |
48 | [TestFixture] | 48 | [TestFixture] |
49 | public class SceneObjectLinkingTests | 49 | public class SceneObjectLinkingTests |
50 | { | 50 | { |
51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -174,13 +174,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
174 | // Link grp4 to grp3. | 174 | // Link grp4 to grp3. |
175 | grp3.LinkToGroup(grp4); | 175 | grp3.LinkToGroup(grp4); |
176 | 176 | ||
177 | // At this point we should have 4 parts total in two groups. | 177 | // At this point we should have 4 parts total in two groups. |
178 | Assert.That(grp1.Children.Count == 2); | 178 | Assert.That(grp1.Children.Count == 2); |
179 | Assert.That(grp2.IsDeleted, "Group 2 was not registered as deleted after link."); | 179 | Assert.That(grp2.IsDeleted, "Group 2 was not registered as deleted after link."); |
180 | Assert.That(grp2.Children.Count, Is.EqualTo(0), "Group 2 still contained parts after delink."); | 180 | Assert.That(grp2.Children.Count, Is.EqualTo(0), "Group 2 still contained parts after delink."); |
181 | Assert.That(grp3.Children.Count == 2); | 181 | Assert.That(grp3.Children.Count == 2); |
182 | Assert.That(grp4.IsDeleted, "Group 4 was not registered as deleted after link."); | 182 | Assert.That(grp4.IsDeleted, "Group 4 was not registered as deleted after link."); |
183 | Assert.That(grp4.Children.Count, Is.EqualTo(0), "Group 4 still contained parts after delink."); | 183 | Assert.That(grp4.Children.Count, Is.EqualTo(0), "Group 4 still contained parts after delink."); |
184 | 184 | ||
185 | if (debugtest) | 185 | if (debugtest) |
186 | { | 186 | { |
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
194 | m_log.Debug("Group3: Pos:"+grp3.AbsolutePosition+", Rot:"+grp3.Rotation); | 194 | m_log.Debug("Group3: Pos:"+grp3.AbsolutePosition+", Rot:"+grp3.Rotation); |
195 | m_log.Debug("Group3: Prim1: OffsetPosition:"+part3.OffsetPosition+", OffsetRotation:"+part3.RotationOffset); | 195 | m_log.Debug("Group3: Prim1: OffsetPosition:"+part3.OffsetPosition+", OffsetRotation:"+part3.RotationOffset); |
196 | m_log.Debug("Group3: Prim2: OffsetPosition:"+part4.OffsetPosition+", OffsetRotation:"+part4.RotationOffset); | 196 | m_log.Debug("Group3: Prim2: OffsetPosition:"+part4.OffsetPosition+", OffsetRotation:"+part4.RotationOffset); |
197 | } | 197 | } |
198 | 198 | ||
199 | // Required for linking | 199 | // Required for linking |
200 | grp1.RootPart.UpdateFlag = 0; | 200 | grp1.RootPart.UpdateFlag = 0; |
@@ -253,6 +253,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
253 | && (part4.RotationOffset.Y - compareQuaternion.Y < 0.00003) | 253 | && (part4.RotationOffset.Y - compareQuaternion.Y < 0.00003) |
254 | && (part4.RotationOffset.Z - compareQuaternion.Z < 0.00003) | 254 | && (part4.RotationOffset.Z - compareQuaternion.Z < 0.00003) |
255 | && (part4.RotationOffset.W - compareQuaternion.W < 0.00003)); | 255 | && (part4.RotationOffset.W - compareQuaternion.W < 0.00003)); |
256 | } | 256 | } |
257 | } | 257 | } |
258 | } | 258 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs index 1c9bce4..8a27b7b 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs | |||
@@ -41,11 +41,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
41 | public class SceneTests | 41 | public class SceneTests |
42 | { | 42 | { |
43 | private class FakeStorageManager : StorageManager | 43 | private class FakeStorageManager : StorageManager |
44 | { | 44 | { |
45 | private class FakeRegionDataStore : IRegionDataStore | 45 | private class FakeRegionDataStore : IRegionDataStore |
46 | { | 46 | { |
47 | public void Initialise(string filename) | 47 | public void Initialise(string filename) |
48 | { | 48 | { |
49 | } | 49 | } |
50 | 50 | ||
51 | public void Dispose() | 51 | public void Dispose() |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs index 1d460dd..b46eb8e 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
44 | { | 44 | { |
45 | /// <summary> | 45 | /// <summary> |
46 | /// Teleport tests in a standalone OpenSim | 46 | /// Teleport tests in a standalone OpenSim |
47 | /// </summary> | 47 | /// </summary> |
48 | [TestFixture] | 48 | [TestFixture] |
49 | public class StandaloneTeleportTests | 49 | public class StandaloneTeleportTests |
50 | { | 50 | { |
@@ -52,7 +52,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
52 | /// Test a teleport between two regions that are not neighbours and do not share any neighbours in common. | 52 | /// Test a teleport between two regions that are not neighbours and do not share any neighbours in common. |
53 | /// </summary> | 53 | /// </summary> |
54 | /// Does not yet do what is says on the tin. | 54 | /// Does not yet do what is says on the tin. |
55 | [Test, LongRunning] | 55 | /// Commenting for now |
56 | //[Test, LongRunning] | ||
56 | public void TestSimpleNotNeighboursTeleport() | 57 | public void TestSimpleNotNeighboursTeleport() |
57 | { | 58 | { |
58 | TestHelper.InMethod(); | 59 | TestHelper.InMethod(); |
@@ -117,14 +118,15 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
117 | // shared module | 118 | // shared module |
118 | ISharedRegionModule interregionComms = new RESTInterregionComms(); | 119 | ISharedRegionModule interregionComms = new RESTInterregionComms(); |
119 | 120 | ||
120 | Scene sceneA = SceneSetupHelpers.SetupScene("sceneA", sceneAId, 1000, 1000, cm); | ||
121 | SceneSetupHelpers.SetupSceneModules(sceneA, new IniConfigSource(), interregionComms); | ||
122 | sceneA.RegisterRegionWithGrid(); | ||
123 | 121 | ||
124 | Scene sceneB = SceneSetupHelpers.SetupScene("sceneB", sceneBId, 1010, 1010, cm); | 122 | Scene sceneB = SceneSetupHelpers.SetupScene("sceneB", sceneBId, 1010, 1010, cm, "grid"); |
125 | SceneSetupHelpers.SetupSceneModules(sceneB, new IniConfigSource(), interregionComms); | 123 | SceneSetupHelpers.SetupSceneModules(sceneB, new IniConfigSource(), interregionComms); |
126 | sceneB.RegisterRegionWithGrid(); | 124 | sceneB.RegisterRegionWithGrid(); |
127 | 125 | ||
126 | Scene sceneA = SceneSetupHelpers.SetupScene("sceneA", sceneAId, 1000, 1000, cm, "grid"); | ||
127 | SceneSetupHelpers.SetupSceneModules(sceneA, new IniConfigSource(), interregionComms); | ||
128 | sceneA.RegisterRegionWithGrid(); | ||
129 | |||
128 | UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000041"); | 130 | UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000041"); |
129 | TestClient client = SceneSetupHelpers.AddRootAgent(sceneA, agentId); | 131 | TestClient client = SceneSetupHelpers.AddRootAgent(sceneA, agentId); |
130 | 132 | ||