take the Monitor.wait out of the locks
parent
b80cbf5060
commit
5c3f88b64d
|
@ -200,10 +200,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
m_archiverModule.ArchiveRegion(archiveWriteStream, requestId);
|
m_archiverModule.ArchiveRegion(archiveWriteStream, requestId);
|
||||||
//AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer;
|
//AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer;
|
||||||
//while (assetServer.HasWaitingRequests())
|
//while (assetServer.HasWaitingRequests())
|
||||||
// assetServer.ProcessNextRequest();
|
// assetServer.ProcessNextRequest();
|
||||||
|
|
||||||
Monitor.Wait(this, 60000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Monitor.Wait(this, 60000);
|
||||||
|
|
||||||
Assert.That(m_lastRequestId, Is.EqualTo(requestId));
|
Assert.That(m_lastRequestId, Is.EqualTo(requestId));
|
||||||
|
|
||||||
|
@ -401,9 +401,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
{
|
{
|
||||||
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
|
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
|
||||||
m_archiverModule.DearchiveRegion(archiveReadStream);
|
m_archiverModule.DearchiveRegion(archiveReadStream);
|
||||||
Monitor.Wait(this, 60000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Monitor.Wait(this, 60000);
|
||||||
Assert.That(m_lastErrorMessage, Is.Null);
|
Assert.That(m_lastErrorMessage, Is.Null);
|
||||||
|
|
||||||
TestLoadedRegion(part1, soundItemName, soundData);
|
TestLoadedRegion(part1, soundItemName, soundData);
|
||||||
|
@ -451,8 +451,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
{
|
{
|
||||||
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
|
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
|
||||||
m_archiverModule.DearchiveRegion(archiveReadStream);
|
m_archiverModule.DearchiveRegion(archiveReadStream);
|
||||||
Monitor.Wait(this, 60000);
|
|
||||||
}
|
}
|
||||||
|
Monitor.Wait(this, 60000);
|
||||||
|
|
||||||
Assert.That(m_lastErrorMessage, Is.Null);
|
Assert.That(m_lastErrorMessage, Is.Null);
|
||||||
|
|
||||||
|
@ -501,11 +501,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
lock (this)
|
lock (this)
|
||||||
{
|
{
|
||||||
m_archiverModule.ArchiveRegion(
|
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));
|
Assert.That(m_lastRequestId, Is.EqualTo(requestId));
|
||||||
|
|
||||||
byte[] archive = archiveWriteStream.ToArray();
|
byte[] archive = archiveWriteStream.ToArray();
|
||||||
|
@ -535,6 +534,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
scene2.EventManager.OnOarFileLoaded += LoadCompleted;
|
scene2.EventManager.OnOarFileLoaded += LoadCompleted;
|
||||||
archiverModule.DearchiveRegion(archiveReadStream);
|
archiverModule.DearchiveRegion(archiveReadStream);
|
||||||
}
|
}
|
||||||
|
Monitor.Wait(this, 60000);
|
||||||
|
|
||||||
Assert.That(m_lastErrorMessage, Is.Null);
|
Assert.That(m_lastErrorMessage, Is.Null);
|
||||||
|
|
||||||
|
@ -600,6 +600,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
|
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
|
||||||
m_archiverModule.DearchiveRegion(oarStream);
|
m_archiverModule.DearchiveRegion(oarStream);
|
||||||
}
|
}
|
||||||
|
Monitor.Wait(this, 60000);
|
||||||
|
|
||||||
ILandObject rLo = m_scene.LandChannel.GetLandObject(16, 16);
|
ILandObject rLo = m_scene.LandChannel.GetLandObject(16, 16);
|
||||||
LandData rLd = rLo.LandData;
|
LandData rLd = rLo.LandData;
|
||||||
|
@ -671,8 +672,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
{
|
{
|
||||||
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
|
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
|
||||||
m_archiverModule.DearchiveRegion(archiveReadStream);
|
m_archiverModule.DearchiveRegion(archiveReadStream);
|
||||||
Monitor.Wait(this, 60000);
|
|
||||||
}
|
}
|
||||||
|
Monitor.Wait(this, 60000);
|
||||||
|
|
||||||
Assert.That(m_lastErrorMessage, Is.Null);
|
Assert.That(m_lastErrorMessage, Is.Null);
|
||||||
RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings;
|
RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings;
|
||||||
|
@ -742,13 +743,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false);
|
m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false);
|
||||||
|
|
||||||
// Write out this scene
|
// Write out this scene
|
||||||
scene.EventManager.OnOarFileSaved += SaveCompleted;
|
|
||||||
|
|
||||||
lock (this)
|
lock (this)
|
||||||
{
|
{
|
||||||
|
scene.EventManager.OnOarFileSaved += SaveCompleted;
|
||||||
m_archiverModule.ArchiveRegion(archiveWriteStream);
|
m_archiverModule.ArchiveRegion(archiveWriteStream);
|
||||||
Monitor.Wait(this, 60000);
|
|
||||||
}
|
}
|
||||||
|
Monitor.Wait(this, 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -765,8 +766,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
|
Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
|
||||||
archiveOptions.Add("merge", null);
|
archiveOptions.Add("merge", null);
|
||||||
m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions);
|
m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions);
|
||||||
Monitor.Wait(this, 60000);
|
|
||||||
}
|
}
|
||||||
|
Monitor.Wait(this, 60000);
|
||||||
|
|
||||||
SceneObjectPart object1Existing = m_scene.GetSceneObjectPart(part1.Name);
|
SceneObjectPart object1Existing = m_scene.GetSceneObjectPart(part1.Name);
|
||||||
Assert.That(object1Existing, Is.Not.Null, "object1 was not present after merge");
|
Assert.That(object1Existing, Is.Not.Null, "object1 was not present after merge");
|
||||||
|
@ -839,7 +840,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
|
|
||||||
// Save OAR
|
// Save OAR
|
||||||
MemoryStream archiveWriteStream = new MemoryStream();
|
MemoryStream archiveWriteStream = new MemoryStream();
|
||||||
m_scene.EventManager.OnOarFileSaved += SaveCompleted;
|
|
||||||
|
|
||||||
Guid requestId = new Guid("00000000-0000-0000-0000-808080808080");
|
Guid requestId = new Guid("00000000-0000-0000-0000-808080808080");
|
||||||
|
|
||||||
|
@ -848,9 +848,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
|
|
||||||
lock (this)
|
lock (this)
|
||||||
{
|
{
|
||||||
|
m_scene.EventManager.OnOarFileSaved += SaveCompleted;
|
||||||
m_archiverModule.ArchiveRegion(archiveWriteStream, requestId, options);
|
m_archiverModule.ArchiveRegion(archiveWriteStream, requestId, options);
|
||||||
Monitor.Wait(this, 60000);
|
|
||||||
}
|
}
|
||||||
|
Monitor.Wait(this, 60000);
|
||||||
|
|
||||||
|
|
||||||
// Check that the OAR contains the expected data
|
// Check that the OAR contains the expected data
|
||||||
|
@ -1023,8 +1024,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
|
Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
|
||||||
archiveOptions.Add("merge", null);
|
archiveOptions.Add("merge", null);
|
||||||
m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions);
|
m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions);
|
||||||
Monitor.Wait(this, 60000);
|
|
||||||
}
|
}
|
||||||
|
Monitor.Wait(this, 60000);
|
||||||
|
|
||||||
Assert.That(m_lastErrorMessage, Is.Null);
|
Assert.That(m_lastErrorMessage, Is.Null);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue