diff options
author | lbsa71 | 2009-04-09 20:06:27 +0000 |
---|---|---|
committer | lbsa71 | 2009-04-09 20:06:27 +0000 |
commit | 6af0751cc5d276370c7c4ce2a0ee064b1106a7bc (patch) | |
tree | 8fae62569ca8bfd02d55a783893b2f412dae89e5 /OpenSim/Region | |
parent | * Remove Autooar module pending it's migration to the forge (diff) | |
download | opensim-SC-6af0751cc5d276370c7c4ce2a0ee064b1106a7bc.zip opensim-SC-6af0751cc5d276370c7c4ce2a0ee064b1106a7bc.tar.gz opensim-SC-6af0751cc5d276370c7c4ce2a0ee064b1106a7bc.tar.bz2 opensim-SC-6af0751cc5d276370c7c4ce2a0ee064b1106a7bc.tar.xz |
* Tagged long running tests with LongRunningAttribute.
* Now, the 144 unit tests takes roughly as long time to run (16s on my laptop) that the 10 long running takes. The database tests takes forever.
* Feel free to run the unit tests as you code, and the rest before commit.
Diffstat (limited to 'OpenSim/Region')
7 files changed, 22 insertions, 15 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs index 1f564b7..80fbba2 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs | |||
@@ -33,6 +33,7 @@ using NUnit.Framework.SyntaxHelpers; | |||
33 | using OpenMetaverse; | 33 | using OpenMetaverse; |
34 | using OpenMetaverse.Packets; | 34 | using OpenMetaverse.Packets; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Tests.Common; | ||
36 | 37 | ||
37 | namespace OpenSim.Region.ClientStack.LindenUDP.Tests | 38 | namespace OpenSim.Region.ClientStack.LindenUDP.Tests |
38 | { | 39 | { |
@@ -146,7 +147,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests | |||
146 | /// <summary> | 147 | /// <summary> |
147 | /// Test adding a client to the stack | 148 | /// Test adding a client to the stack |
148 | /// </summary> | 149 | /// </summary> |
149 | [Test] | 150 | [Test, LongRunning] |
150 | public void TestAddClient() | 151 | public void TestAddClient() |
151 | { | 152 | { |
152 | uint myCircuitCode = 123456; | 153 | uint myCircuitCode = 123456; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index bd8d325..c140ec0 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -40,11 +40,12 @@ using OpenSim.Framework.Communications.Cache; | |||
40 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; | 40 | using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; |
41 | using OpenSim.Region.CoreModules.World.Archiver; | 41 | using OpenSim.Region.CoreModules.World.Archiver; |
42 | using OpenSim.Region.Framework.Scenes; | 42 | using OpenSim.Region.Framework.Scenes; |
43 | using OpenSim.Tests.Common; | ||
43 | using OpenSim.Tests.Common.Setup; | 44 | using OpenSim.Tests.Common.Setup; |
44 | 45 | ||
45 | namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | 46 | namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests |
46 | { | 47 | { |
47 | [TestFixture] | 48 | [TestFixture, LongRunning] |
48 | public class InventoryArchiverTests | 49 | public class InventoryArchiverTests |
49 | { | 50 | { |
50 | private void SaveCompleted( | 51 | private void SaveCompleted( |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 6a64ff1..04c3289 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -38,11 +38,12 @@ using OpenSim.Framework.Serialization; | |||
38 | using OpenSim.Region.CoreModules.World.Serialiser; | 38 | using OpenSim.Region.CoreModules.World.Serialiser; |
39 | using OpenSim.Region.CoreModules.World.Terrain; | 39 | using OpenSim.Region.CoreModules.World.Terrain; |
40 | using OpenSim.Region.Framework.Scenes; | 40 | using OpenSim.Region.Framework.Scenes; |
41 | using OpenSim.Tests.Common; | ||
41 | using OpenSim.Tests.Common.Setup; | 42 | using OpenSim.Tests.Common.Setup; |
42 | 43 | ||
43 | namespace OpenSim.Region.CoreModules.World.Archiver.Tests | 44 | namespace OpenSim.Region.CoreModules.World.Archiver.Tests |
44 | { | 45 | { |
45 | [TestFixture] | 46 | [TestFixture, LongRunning] |
46 | public class ArchiverTests | 47 | public class ArchiverTests |
47 | { | 48 | { |
48 | private void SaveCompleted(string errorMessage) | 49 | private void SaveCompleted(string errorMessage) |
@@ -230,7 +231,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
230 | /// <summary> | 231 | /// <summary> |
231 | /// Test merging a V0.2 OpenSim Region Archive into an existing scene | 232 | /// Test merging a V0.2 OpenSim Region Archive into an existing scene |
232 | /// </summary> | 233 | /// </summary> |
233 | ///[Test] | 234 | |
235 | [Test] | ||
234 | public void TestMergeOarV0p2() | 236 | public void TestMergeOarV0p2() |
235 | { | 237 | { |
236 | //XmlConfigurator.Configure(); | 238 | //XmlConfigurator.Configure(); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs index 480abc6..d1ef686 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs | |||
@@ -37,11 +37,12 @@ using OpenMetaverse; | |||
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Communications; | 38 | using OpenSim.Framework.Communications; |
39 | using OpenSim.Region.Framework.Scenes; | 39 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Tests.Common; | ||
40 | using OpenSim.Tests.Common.Setup; | 41 | using OpenSim.Tests.Common.Setup; |
41 | 42 | ||
42 | namespace OpenSim.Region.Framework.Scenes.Tests | 43 | namespace OpenSim.Region.Framework.Scenes.Tests |
43 | { | 44 | { |
44 | [TestFixture] | 45 | [TestFixture, LongRunning] |
45 | public class EntityManagerTests | 46 | public class EntityManagerTests |
46 | { | 47 | { |
47 | static public Random random; | 48 | static public Random random; |
@@ -51,7 +52,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
51 | [Test] | 52 | [Test] |
52 | public void T010_AddObjects() | 53 | public void T010_AddObjects() |
53 | { | 54 | { |
54 | Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); | 55 | // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); |
55 | 56 | ||
56 | random = new Random(); | 57 | random = new Random(); |
57 | SceneObjectGroup found; | 58 | SceneObjectGroup found; |
@@ -86,7 +87,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
86 | [Test] | 87 | [Test] |
87 | public void T011_ThreadAddRemoveTest() | 88 | public void T011_ThreadAddRemoveTest() |
88 | { | 89 | { |
89 | Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); | 90 | // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); |
90 | 91 | ||
91 | // This test adds and removes with mutiple threads, attempting to break the | 92 | // This test adds and removes with mutiple threads, attempting to break the |
92 | // uuid and localid dictionary coherence. | 93 | // uuid and localid dictionary coherence. |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index 59f1ba4..5c3d653 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | |||
@@ -35,6 +35,7 @@ using OpenSim.Framework.Communications; | |||
35 | using OpenSim.Framework.Communications.Cache; | 35 | using OpenSim.Framework.Communications.Cache; |
36 | using OpenSim.Region.Communications.Local; | 36 | using OpenSim.Region.Communications.Local; |
37 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
38 | using OpenSim.Tests.Common; | ||
38 | using OpenSim.Tests.Common.Mock; | 39 | using OpenSim.Tests.Common.Mock; |
39 | using OpenSim.Tests.Common.Setup; | 40 | using OpenSim.Tests.Common.Setup; |
40 | 41 | ||
@@ -49,7 +50,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
49 | /// <summary> | 50 | /// <summary> |
50 | /// Test adding an object to a scene. | 51 | /// Test adding an object to a scene. |
51 | /// </summary> | 52 | /// </summary> |
52 | [Test] | 53 | [Test, LongRunning] |
53 | public void TestAddSceneObject() | 54 | public void TestAddSceneObject() |
54 | { | 55 | { |
55 | Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); | 56 | Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs index 46bfb30..80d2ba9 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs | |||
@@ -35,6 +35,7 @@ using OpenSim.Framework; | |||
35 | using OpenSim.Framework.Communications; | 35 | using OpenSim.Framework.Communications; |
36 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
37 | using OpenSim.Region.CoreModules.Communications.REST; | 37 | using OpenSim.Region.CoreModules.Communications.REST; |
38 | using OpenSim.Tests.Common; | ||
38 | using OpenSim.Tests.Common.Mock; | 39 | using OpenSim.Tests.Common.Mock; |
39 | using OpenSim.Tests.Common.Setup; | 40 | using OpenSim.Tests.Common.Setup; |
40 | 41 | ||
@@ -50,10 +51,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
50 | /// Test a teleport between two regions that are not neighbours and do not share any neighbours in common. | 51 | /// Test a teleport between two regions that are not neighbours and do not share any neighbours in common. |
51 | /// </summary> | 52 | /// </summary> |
52 | /// Does not yet do what is says on the tin. | 53 | /// Does not yet do what is says on the tin. |
53 | [Test] | 54 | [Test, LongRunning] |
54 | public void TestSimpleNotNeighboursTeleport() | 55 | public void TestSimpleNotNeighboursTeleport() |
55 | { | 56 | { |
56 | Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); | 57 | // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); |
57 | 58 | ||
58 | log4net.Config.XmlConfigurator.Configure(); | 59 | log4net.Config.XmlConfigurator.Configure(); |
59 | 60 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs index cde772b..cf98cf1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs | |||
@@ -41,12 +41,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
41 | /// <summary> | 41 | /// <summary> |
42 | /// Tests for LSL_Api | 42 | /// Tests for LSL_Api |
43 | /// </summary> | 43 | /// </summary> |
44 | [TestFixture] | 44 | [TestFixture, LongRunning] |
45 | public class LSL_ApiTest | 45 | public class LSL_ApiTest |
46 | { | 46 | { |
47 | 47 | ||
48 | private const double ANGLE_ACCURACY_IN_RADIANS = 1E-6; | 48 | private const double ANGLE_ACCURACY_IN_RADIANS = 1E-6; |
49 | private LSL_Api lslApi; | 49 | private LSL_Api m_lslApi; |
50 | 50 | ||
51 | [SetUp] | 51 | [SetUp] |
52 | public void SetUp() | 52 | public void SetUp() |
@@ -62,8 +62,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
62 | XEngine.XEngine engine = new XEngine.XEngine(); | 62 | XEngine.XEngine engine = new XEngine.XEngine(); |
63 | engine.Initialise(scene, initConfigSource); | 63 | engine.Initialise(scene, initConfigSource); |
64 | 64 | ||
65 | lslApi = new LSL_Api(); | 65 | m_lslApi = new LSL_Api(); |
66 | lslApi.Initialize(engine, part, part.LocalId, part.UUID); | 66 | m_lslApi.Initialize(engine, part, part.LocalId, part.UUID); |
67 | 67 | ||
68 | } | 68 | } |
69 | 69 | ||
@@ -92,7 +92,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
92 | Quaternion rotation1 = Quaternion.CreateFromAxisAngle(axis, 0); | 92 | Quaternion rotation1 = Quaternion.CreateFromAxisAngle(axis, 0); |
93 | Quaternion rotation2 = Quaternion.CreateFromAxisAngle(axis, ToRadians(originalAngle)); | 93 | Quaternion rotation2 = Quaternion.CreateFromAxisAngle(axis, ToRadians(originalAngle)); |
94 | 94 | ||
95 | double deducedAngle = FromLslFloat(lslApi.llAngleBetween(ToLslQuaternion(rotation2), ToLslQuaternion(rotation1))); | 95 | double deducedAngle = FromLslFloat(m_lslApi.llAngleBetween(ToLslQuaternion(rotation2), ToLslQuaternion(rotation1))); |
96 | 96 | ||
97 | Assert.Greater(deducedAngle, ToRadians(originalAngle) - ANGLE_ACCURACY_IN_RADIANS); | 97 | Assert.Greater(deducedAngle, ToRadians(originalAngle) - ANGLE_ACCURACY_IN_RADIANS); |
98 | Assert.Less(deducedAngle, ToRadians(originalAngle) + ANGLE_ACCURACY_IN_RADIANS); | 98 | Assert.Less(deducedAngle, ToRadians(originalAngle) + ANGLE_ACCURACY_IN_RADIANS); |