From a3abd65e3de850a4516b91a017b1049ce4abe4fe Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 20 Mar 2012 01:41:32 +0000
Subject: Remove pointless ThreadAbortException catching in a test that isn't
run anyway.
---
.../Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/Tests')
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
index c5a76b2..bebc10c 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -63,17 +63,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Thread testThread = new Thread(testClass.run);
- try
- {
- // Seems kind of redundant to start a thread and then join it, however.. We need to protect against
- // A thread abort exception in the simulator code.
- testThread.Start();
- testThread.Join();
- }
- catch (ThreadAbortException)
- {
-
- }
+ // Seems kind of redundant to start a thread and then join it, however.. We need to protect against
+ // A thread abort exception in the simulator code.
+ testThread.Start();
+ testThread.Join();
+
Assert.That(testClass.results.Result, Is.EqualTo(true), testClass.results.Message);
// Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
}
--
cgit v1.1
From 30b2a8c778d02926e038bc62977c4a4c9dbec5ee Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 20 Mar 2012 23:12:21 +0000
Subject: Move frame loop entirely within Scene.Update() for better future
performance analysis and stat accuracy.
Update() now accepts a frames parameter which can control the number of frames updated.
-1 will update until shutdown.
The watchdog updating moves above the maintc recalculation for any required sleep since it should be accounted for within the frame.
---
.../Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs | 12 +++++-------
OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs | 2 +-
2 files changed, 6 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/Tests')
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs
index 442cb8b..cfea10d 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
// For now, we'll make the scene presence fly to simplify this test, but this needs to change.
sp.Flying = true;
- m_scene.Update();
+ m_scene.Update(1);
Assert.That(sp.AbsolutePosition, Is.EqualTo(startPos));
Vector3 targetPos = startPos + new Vector3(0, 10, 0);
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(
sp.Rotation, new QuaternionToleranceConstraint(new Quaternion(0, 0, 0.7071068f, 0.7071068f), 0.000001));
- m_scene.Update();
+ m_scene.Update(1);
// We should really check the exact figure.
Assert.That(sp.AbsolutePosition.X, Is.EqualTo(startPos.X));
@@ -99,8 +99,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(sp.AbsolutePosition.Z, Is.EqualTo(startPos.Z));
Assert.That(sp.AbsolutePosition.Z, Is.LessThan(targetPos.X));
- for (int i = 0; i < 10; i++)
- m_scene.Update();
+ m_scene.Update(10);
double distanceToTarget = Util.GetDistanceTo(sp.AbsolutePosition, targetPos);
Assert.That(distanceToTarget, Is.LessThan(1), "Avatar not within 1 unit of target position on first move");
@@ -116,7 +115,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(
sp.Rotation, new QuaternionToleranceConstraint(new Quaternion(0, 0, 0, 1), 0.000001));
- m_scene.Update();
+ m_scene.Update(1);
// We should really check the exact figure.
Assert.That(sp.AbsolutePosition.X, Is.GreaterThan(startPos.X));
@@ -124,8 +123,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(sp.AbsolutePosition.Y, Is.EqualTo(startPos.Y));
Assert.That(sp.AbsolutePosition.Z, Is.EqualTo(startPos.Z));
- for (int i = 0; i < 10; i++)
- m_scene.Update();
+ m_scene.Update(10);
distanceToTarget = Util.GetDistanceTo(sp.AbsolutePosition, targetPos);
Assert.That(distanceToTarget, Is.LessThan(1), "Avatar not within 1 unit of target position on second move");
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
index 8b8aea5..5c9a77d 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
TestHelpers.InMethod();
Scene scene = SceneHelpers.SetupScene();
- scene.Update();
+ scene.Update(1);
Assert.That(scene.Frame, Is.EqualTo(1));
}
--
cgit v1.1
From c4b2d24f337eeaf8c7d8e643c3491d491d584cde Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 22 Mar 2012 22:17:07 +0000
Subject: Add llGiveInventory() test from object to object where both objects
are owned by the same user.
---
OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/Tests')
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
index e16903c..55c80f5 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Framework.Tests
}
///
- /// Test MoveTaskInventoryItem where the item has no parent folder assigned.
+ /// Test MoveTaskInventoryItem from a part inventory to a user inventory where the item has no parent folder assigned.
///
///
/// This should place it in the most suitable user folder.
@@ -142,9 +142,11 @@ namespace OpenSim.Region.Framework.Tests
}
///
- /// Test MoveTaskInventoryItem where the item has no parent folder assigned.
+ /// Test MoveTaskInventoryItem from a part inventory to a user inventory where the item has no parent folder assigned.
///
+ ///
/// This should place it in the most suitable user folder.
+ ///
[Test]
public void TestMoveTaskInventoryItemNoParent()
{
--
cgit v1.1