revert take the Monitor.wait out of the locks
parent
1de096dffb
commit
e28eecd0bf
|
@ -200,10 +200,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
|||
m_archiverModule.ArchiveRegion(archiveWriteStream, requestId);
|
||||
//AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer;
|
||||
//while (assetServer.HasWaitingRequests())
|
||||
// assetServer.ProcessNextRequest();
|
||||
// assetServer.ProcessNextRequest();
|
||||
|
||||
Monitor.Wait(this, 60000);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
Monitor.Wait(this, 60000);
|
||||
|
||||
Assert.That(m_lastErrorMessage, Is.Null);
|
||||
|
||||
|
@ -501,10 +501,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
|||
lock (this)
|
||||
{
|
||||
m_archiverModule.ArchiveRegion(
|
||||
archiveWriteStream, requestId, new Dictionary<string, Object>() { { "wipe-owners", Boolean.TrueString } });
|
||||
archiveWriteStream, requestId, new Dictionary<string, Object>() { { "wipe-owners", Boolean.TrueString } });
|
||||
|
||||
Monitor.Wait(this, 60000);
|
||||
}
|
||||
Monitor.Wait(this, 60000);
|
||||
|
||||
|
||||
Assert.That(m_lastRequestId, Is.EqualTo(requestId));
|
||||
|
||||
byte[] archive = archiveWriteStream.ToArray();
|
||||
|
@ -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);
|
||||
}
|
||||
Monitor.Wait(this, 60000);
|
||||
|
||||
Assert.That(m_lastErrorMessage, Is.Null);
|
||||
RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings;
|
||||
|
@ -743,13 +742,13 @@ 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);
|
||||
}
|
||||
Monitor.Wait(this, 60000);
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
Monitor.Wait(this, 60000);
|
||||
|
||||
Assert.That(m_lastErrorMessage, Is.Null);
|
||||
|
||||
|
|
Loading…
Reference in New Issue