* 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.
0.6.5-rc1
lbsa71 2009-04-09 20:06:27 +00:00
parent 1066aa6998
commit 6af0751cc5
8 changed files with 23 additions and 16 deletions

View File

@ -33,6 +33,7 @@ using NUnit.Framework.SyntaxHelpers;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.Packets; using OpenMetaverse.Packets;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Tests.Common;
namespace OpenSim.Region.ClientStack.LindenUDP.Tests namespace OpenSim.Region.ClientStack.LindenUDP.Tests
{ {
@ -146,7 +147,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
/// <summary> /// <summary>
/// Test adding a client to the stack /// Test adding a client to the stack
/// </summary> /// </summary>
[Test] [Test, LongRunning]
public void TestAddClient() public void TestAddClient()
{ {
uint myCircuitCode = 123456; uint myCircuitCode = 123456;

View File

@ -40,11 +40,12 @@ using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
using OpenSim.Region.CoreModules.World.Archiver; using OpenSim.Region.CoreModules.World.Archiver;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Setup; using OpenSim.Tests.Common.Setup;
namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
{ {
[TestFixture] [TestFixture, LongRunning]
public class InventoryArchiverTests public class InventoryArchiverTests
{ {
private void SaveCompleted( private void SaveCompleted(

View File

@ -38,11 +38,12 @@ using OpenSim.Framework.Serialization;
using OpenSim.Region.CoreModules.World.Serialiser; using OpenSim.Region.CoreModules.World.Serialiser;
using OpenSim.Region.CoreModules.World.Terrain; using OpenSim.Region.CoreModules.World.Terrain;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Setup; using OpenSim.Tests.Common.Setup;
namespace OpenSim.Region.CoreModules.World.Archiver.Tests namespace OpenSim.Region.CoreModules.World.Archiver.Tests
{ {
[TestFixture] [TestFixture, LongRunning]
public class ArchiverTests public class ArchiverTests
{ {
private void SaveCompleted(string errorMessage) private void SaveCompleted(string errorMessage)
@ -230,7 +231,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
/// <summary> /// <summary>
/// Test merging a V0.2 OpenSim Region Archive into an existing scene /// Test merging a V0.2 OpenSim Region Archive into an existing scene
/// </summary> /// </summary>
///[Test]
[Test]
public void TestMergeOarV0p2() public void TestMergeOarV0p2()
{ {
//XmlConfigurator.Configure(); //XmlConfigurator.Configure();

View File

@ -37,11 +37,12 @@ using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Setup; using OpenSim.Tests.Common.Setup;
namespace OpenSim.Region.Framework.Scenes.Tests namespace OpenSim.Region.Framework.Scenes.Tests
{ {
[TestFixture] [TestFixture, LongRunning]
public class EntityManagerTests public class EntityManagerTests
{ {
static public Random random; static public Random random;
@ -51,7 +52,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test] [Test]
public void T010_AddObjects() public void T010_AddObjects()
{ {
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
random = new Random(); random = new Random();
SceneObjectGroup found; SceneObjectGroup found;
@ -86,7 +87,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test] [Test]
public void T011_ThreadAddRemoveTest() public void T011_ThreadAddRemoveTest()
{ {
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
// This test adds and removes with mutiple threads, attempting to break the // This test adds and removes with mutiple threads, attempting to break the
// uuid and localid dictionary coherence. // uuid and localid dictionary coherence.

View File

@ -35,6 +35,7 @@ using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.Communications.Local; using OpenSim.Region.Communications.Local;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Mock; using OpenSim.Tests.Common.Mock;
using OpenSim.Tests.Common.Setup; using OpenSim.Tests.Common.Setup;
@ -49,7 +50,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// <summary> /// <summary>
/// Test adding an object to a scene. /// Test adding an object to a scene.
/// </summary> /// </summary>
[Test] [Test, LongRunning]
public void TestAddSceneObject() public void TestAddSceneObject()
{ {
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());

View File

@ -35,6 +35,7 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.CoreModules.Communications.REST; using OpenSim.Region.CoreModules.Communications.REST;
using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Mock; using OpenSim.Tests.Common.Mock;
using OpenSim.Tests.Common.Setup; using OpenSim.Tests.Common.Setup;
@ -50,10 +51,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Test a teleport between two regions that are not neighbours and do not share any neighbours in common. /// Test a teleport between two regions that are not neighbours and do not share any neighbours in common.
/// </summary> /// </summary>
/// Does not yet do what is says on the tin. /// Does not yet do what is says on the tin.
[Test] [Test, LongRunning]
public void TestSimpleNotNeighboursTeleport() public void TestSimpleNotNeighboursTeleport()
{ {
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
log4net.Config.XmlConfigurator.Configure(); log4net.Config.XmlConfigurator.Configure();

View File

@ -41,12 +41,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
/// <summary> /// <summary>
/// Tests for LSL_Api /// Tests for LSL_Api
/// </summary> /// </summary>
[TestFixture] [TestFixture, LongRunning]
public class LSL_ApiTest public class LSL_ApiTest
{ {
private const double ANGLE_ACCURACY_IN_RADIANS = 1E-6; private const double ANGLE_ACCURACY_IN_RADIANS = 1E-6;
private LSL_Api lslApi; private LSL_Api m_lslApi;
[SetUp] [SetUp]
public void SetUp() public void SetUp()
@ -62,8 +62,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
XEngine.XEngine engine = new XEngine.XEngine(); XEngine.XEngine engine = new XEngine.XEngine();
engine.Initialise(scene, initConfigSource); engine.Initialise(scene, initConfigSource);
lslApi = new LSL_Api(); m_lslApi = new LSL_Api();
lslApi.Initialize(engine, part, part.LocalId, part.UUID); m_lslApi.Initialize(engine, part, part.LocalId, part.UUID);
} }
@ -92,7 +92,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
Quaternion rotation1 = Quaternion.CreateFromAxisAngle(axis, 0); Quaternion rotation1 = Quaternion.CreateFromAxisAngle(axis, 0);
Quaternion rotation2 = Quaternion.CreateFromAxisAngle(axis, ToRadians(originalAngle)); Quaternion rotation2 = Quaternion.CreateFromAxisAngle(axis, ToRadians(originalAngle));
double deducedAngle = FromLslFloat(lslApi.llAngleBetween(ToLslQuaternion(rotation2), ToLslQuaternion(rotation1))); double deducedAngle = FromLslFloat(m_lslApi.llAngleBetween(ToLslQuaternion(rotation2), ToLslQuaternion(rotation1)));
Assert.Greater(deducedAngle, ToRadians(originalAngle) - ANGLE_ACCURACY_IN_RADIANS); Assert.Greater(deducedAngle, ToRadians(originalAngle) - ANGLE_ACCURACY_IN_RADIANS);
Assert.Less(deducedAngle, ToRadians(originalAngle) + ANGLE_ACCURACY_IN_RADIANS); Assert.Less(deducedAngle, ToRadians(originalAngle) + ANGLE_ACCURACY_IN_RADIANS);

View File

@ -10,7 +10,7 @@ namespace OpenSim.Tests.Common
Inherited = true)] Inherited = true)]
public class LongRunningAttribute : CategoryAttribute public class LongRunningAttribute : CategoryAttribute
{ {
protected LongRunningAttribute() : this("Long Running Test") public LongRunningAttribute() : this("Long Running Test")
{ {
} }