aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorUbitUmarov2015-11-16 20:34:23 +0000
committerUbitUmarov2015-11-16 20:34:23 +0000
commit250db8c82a68680cb6ed8d0cbc39f3041393fce8 (patch)
treea0a4199146d033a771ecce671e584de3a237ea55 /OpenSim/Region/Framework/Scenes
parent deatach from backup on attachment (diff)
downloadopensim-SC-250db8c82a68680cb6ed8d0cbc39f3041393fce8.zip
opensim-SC-250db8c82a68680cb6ed8d0cbc39f3041393fce8.tar.gz
opensim-SC-250db8c82a68680cb6ed8d0cbc39f3041393fce8.tar.bz2
opensim-SC-250db8c82a68680cb6ed8d0cbc39f3041393fce8.tar.xz
work around some 'tests' error: object crossing is async
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs
index 5635c20..4a98746 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs
@@ -37,6 +37,7 @@ using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
37using OpenSim.Region.CoreModules.World.Land; 37using OpenSim.Region.CoreModules.World.Land;
38using OpenSim.Region.OptionalModules; 38using OpenSim.Region.OptionalModules;
39using OpenSim.Tests.Common; 39using OpenSim.Tests.Common;
40using System.Threading;
40 41
41namespace OpenSim.Region.Framework.Scenes.Tests 42namespace OpenSim.Region.Framework.Scenes.Tests
42{ 43{
@@ -64,6 +65,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
64 [Test] 65 [Test]
65 public void TestCrossOnSameSimulator() 66 public void TestCrossOnSameSimulator()
66 { 67 {
68
67 TestHelpers.InMethod(); 69 TestHelpers.InMethod();
68// TestHelpers.EnableLogging(); 70// TestHelpers.EnableLogging();
69 71
@@ -94,6 +96,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
94 // Cross with a negative value 96 // Cross with a negative value
95 so1.AbsolutePosition = new Vector3(128, -10, 20); 97 so1.AbsolutePosition = new Vector3(128, -10, 20);
96 98
99 // crossing is async
100 Thread.Sleep(500);
101
97 Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id)); 102 Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id));
98 Assert.NotNull(sceneB.GetSceneObjectGroup(so1Id)); 103 Assert.NotNull(sceneB.GetSceneObjectGroup(so1Id));
99 } 104 }
@@ -154,6 +159,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
154 sceneA.SceneGraph.UpdatePrimGroupPosition( 159 sceneA.SceneGraph.UpdatePrimGroupPosition(
155 so1.LocalId, new Vector3(so1StartPos.X, so1StartPos.Y - 20, so1StartPos.Z), userId); 160 so1.LocalId, new Vector3(so1StartPos.X, so1StartPos.Y - 20, so1StartPos.Z), userId);
156 161
162 // crossing is async
163 Thread.Sleep(500);
164
157 SceneObjectGroup so1PostCross; 165 SceneObjectGroup so1PostCross;
158 166
159 { 167 {
@@ -181,6 +189,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
181 sceneB.SceneGraph.UpdatePrimGroupPosition( 189 sceneB.SceneGraph.UpdatePrimGroupPosition(
182 so1PostCross.LocalId, new Vector3(so1PostCrossPos.X, so1PostCrossPos.Y + 20, so1PostCrossPos.Z), userId); 190 so1PostCross.LocalId, new Vector3(so1PostCrossPos.X, so1PostCrossPos.Y + 20, so1PostCrossPos.Z), userId);
183 191
192 // crossing is async
193 Thread.Sleep(500);
194
184 { 195 {
185 ScenePresence sp1SceneBPostReCross = sceneB.GetScenePresence(userId); 196 ScenePresence sp1SceneBPostReCross = sceneB.GetScenePresence(userId);
186 Assert.IsTrue(sp1SceneBPostReCross.IsChildAgent, "sp1SceneBPostReCross.IsChildAgent unexpectedly false"); 197 Assert.IsTrue(sp1SceneBPostReCross.IsChildAgent, "sp1SceneBPostReCross.IsChildAgent unexpectedly false");
@@ -252,6 +263,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
252 // because only this will execute permission checks in the source region. 263 // because only this will execute permission checks in the source region.
253 sceneA.SceneGraph.UpdatePrimGroupPosition(so1.LocalId, new Vector3(128, -10, 20), userId); 264 sceneA.SceneGraph.UpdatePrimGroupPosition(so1.LocalId, new Vector3(128, -10, 20), userId);
254 265
266 // crossing is async
267 Thread.Sleep(500);
268
255 Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id)); 269 Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id));
256 Assert.NotNull(sceneB.GetSceneObjectGroup(so1Id)); 270 Assert.NotNull(sceneB.GetSceneObjectGroup(so1Id));
257 } 271 }