instrument most of the tests with a new InMethod function that may help us figure

out where that pesky deadlock is during test runs.
This commit is contained in:
Sean Dague
2009-05-07 19:07:08 +00:00
parent 84815ab271
commit ce0a84cbc0
15 changed files with 91 additions and 17 deletions

View File

@@ -52,6 +52,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void T010_AddObjects()
{
TestHelper.InMethod();
// Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
random = new Random();
@@ -87,6 +88,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void T011_ThreadAddRemoveTest()
{
TestHelper.InMethod();
// Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
// This test adds and removes with mutiple threads, attempting to break the

View File

@@ -53,8 +53,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test, LongRunning]
public void TestAddSceneObject()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
Scene scene = SceneSetupHelpers.SetupScene();
SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene);
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void TestDeleteSceneObject()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
TestScene scene = SceneSetupHelpers.SetupScene();
SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene);
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void TestDeleteSceneObjectAsync()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void TestDeleteSceneObjectAsyncToUserInventory()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
//log4net.Config.XmlConfigurator.Configure();
UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");

View File

@@ -35,6 +35,7 @@ using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.Communications.Local;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Mock;
using OpenSim.Tests.Common.Setup;
using log4net;
@@ -52,7 +53,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void TestLinkDelink2SceneObjects()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
bool debugtest = false;
@@ -130,7 +131,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void TestLinkDelink2groups4SceneObjects()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
bool debugtest = false;

View File

@@ -42,6 +42,7 @@ using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.CoreModules.ServiceConnectors.Interregion;
using OpenSim.Region.CoreModules.World.Serialiser;
using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Mock;
using OpenSim.Tests.Common.Setup;
@@ -99,7 +100,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void T010_TestAddRootAgent()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
string firstName = "testfirstname";
@@ -133,7 +134,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void T011_TestRemoveRootAgent()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
scene.RemoveClient(agent1);
@@ -145,7 +146,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void T012_TestAddNeighbourRegion()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
string reason;
scene.NewUserConnection(acd1, out reason);
@@ -167,7 +168,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void T013_TestRemoveNeighbourRegion()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
ScenePresence presence = scene.GetScenePresence(agent1);
presence.RemoveNeighbourRegion(region3);
@@ -184,7 +185,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void T020_TestMakeRootAgent()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
ScenePresence presence = scene.GetScenePresence(agent1);
Assert.That(presence.IsChildAgent, Is.False, "Starts out as a root agent");
@@ -202,7 +203,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void T021_TestCrossToNewRegion()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
// Adding child agent to region 1001
string reason;
@@ -295,7 +296,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void T030_TestAddAttachments()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
ScenePresence presence = scene.GetScenePresence(agent1);
@@ -310,7 +311,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void T031_RemoveAttachments()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
ScenePresence presence = scene.GetScenePresence(agent1);
presence.RemoveAttachment(sog1);
@@ -322,7 +323,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test]
public void T032_CrossAttachments()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
ScenePresence presence = scene.GetScenePresence(agent1);
ScenePresence presence2 = scene2.GetScenePresence(agent1);
@@ -342,7 +343,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
public static string GetRandomCapsObjectPath()
{
Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
TestHelper.InMethod();
UUID caps = UUID.Random();
string capsPath = caps.ToString();

View File

@@ -54,6 +54,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[Test, LongRunning]
public void TestSimpleNotNeighboursTeleport()
{
TestHelper.InMethod();
// Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
log4net.Config.XmlConfigurator.Configure();