revert take the Monitor.wait out of the locks

LSLKeyTest
UbitUmarov 2015-11-22 08:08:01 +00:00
parent 1de096dffb
commit e28eecd0bf
1 changed files with 16 additions and 17 deletions

View File

@ -201,9 +201,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
//AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer;
//while (assetServer.HasWaitingRequests())
// assetServer.ProcessNextRequest();
}
Monitor.Wait(this, 60000);
}
Assert.That(m_lastRequestId, Is.EqualTo(requestId));
@ -401,9 +401,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
{
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
m_archiverModule.DearchiveRegion(archiveReadStream);
Monitor.Wait(this, 60000);
}
Monitor.Wait(this, 60000);
Assert.That(m_lastErrorMessage, Is.Null);
TestLoadedRegion(part1, soundItemName, soundData);
@ -451,8 +451,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
{
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
m_archiverModule.DearchiveRegion(archiveReadStream);
}
Monitor.Wait(this, 60000);
}
Assert.That(m_lastErrorMessage, Is.Null);
@ -502,8 +502,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
{
m_archiverModule.ArchiveRegion(
archiveWriteStream, requestId, new Dictionary<string, Object>() { { "wipe-owners", Boolean.TrueString } });
}
Monitor.Wait(this, 60000);
}
Assert.That(m_lastRequestId, Is.EqualTo(requestId));
@ -534,7 +535,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
scene2.EventManager.OnOarFileLoaded += LoadCompleted;
archiverModule.DearchiveRegion(archiveReadStream);
}
Monitor.Wait(this, 60000);
Assert.That(m_lastErrorMessage, Is.Null);
@ -600,7 +600,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
m_archiverModule.DearchiveRegion(oarStream);
}
Monitor.Wait(this, 60000);
ILandObject rLo = m_scene.LandChannel.GetLandObject(16, 16);
LandData rLd = rLo.LandData;
@ -672,8 +671,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
{
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
m_archiverModule.DearchiveRegion(archiveReadStream);
}
Monitor.Wait(this, 60000);
}
Assert.That(m_lastErrorMessage, Is.Null);
RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings;
@ -743,14 +742,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false);
// Write out this scene
scene.EventManager.OnOarFileSaved += SaveCompleted;
lock (this)
{
scene.EventManager.OnOarFileSaved += SaveCompleted;
m_archiverModule.ArchiveRegion(archiveWriteStream);
}
Monitor.Wait(this, 60000);
}
}
{
SceneObjectPart part1 = CreateSceneObjectPart1();
@ -766,8 +765,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
archiveOptions.Add("merge", null);
m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions);
}
Monitor.Wait(this, 60000);
}
SceneObjectPart object1Existing = m_scene.GetSceneObjectPart(part1.Name);
Assert.That(object1Existing, Is.Not.Null, "object1 was not present after merge");
@ -840,6 +839,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
// Save OAR
MemoryStream archiveWriteStream = new MemoryStream();
m_scene.EventManager.OnOarFileSaved += SaveCompleted;
Guid requestId = new Guid("00000000-0000-0000-0000-808080808080");
@ -848,10 +848,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
lock (this)
{
m_scene.EventManager.OnOarFileSaved += SaveCompleted;
m_archiverModule.ArchiveRegion(archiveWriteStream, requestId, options);
}
Monitor.Wait(this, 60000);
}
// Check that the OAR contains the expected data
@ -1024,8 +1023,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
// archiveOptions.Add("merge", null);
m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions);
}
Monitor.Wait(this, 60000);
}
Assert.That(m_lastErrorMessage, Is.Null);