aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorUbitUmarov2015-11-22 07:55:49 +0000
committerUbitUmarov2015-11-22 07:55:49 +0000
commit5c3f88b64d52559283637079754760a835435d92 (patch)
tree41386f8126d8a8e0c008b965657c43c12689766f /OpenSim/Region/CoreModules
parent a few more changes on Multiregion control file load (diff)
downloadopensim-SC-5c3f88b64d52559283637079754760a835435d92.zip
opensim-SC-5c3f88b64d52559283637079754760a835435d92.tar.gz
opensim-SC-5c3f88b64d52559283637079754760a835435d92.tar.bz2
opensim-SC-5c3f88b64d52559283637079754760a835435d92.tar.xz
take the Monitor.wait out of the locks
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs33
1 files changed, 17 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
index 9de5c43..7211d38 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
@@ -200,10 +200,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
200 m_archiverModule.ArchiveRegion(archiveWriteStream, requestId); 200 m_archiverModule.ArchiveRegion(archiveWriteStream, requestId);
201 //AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer; 201 //AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer;
202 //while (assetServer.HasWaitingRequests()) 202 //while (assetServer.HasWaitingRequests())
203 // assetServer.ProcessNextRequest(); 203 // assetServer.ProcessNextRequest();
204
205 Monitor.Wait(this, 60000);
206 } 204 }
205
206 Monitor.Wait(this, 60000);
207 207
208 Assert.That(m_lastRequestId, Is.EqualTo(requestId)); 208 Assert.That(m_lastRequestId, Is.EqualTo(requestId));
209 209
@@ -401,9 +401,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
401 { 401 {
402 m_scene.EventManager.OnOarFileLoaded += LoadCompleted; 402 m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
403 m_archiverModule.DearchiveRegion(archiveReadStream); 403 m_archiverModule.DearchiveRegion(archiveReadStream);
404 Monitor.Wait(this, 60000);
405 } 404 }
406 405
406 Monitor.Wait(this, 60000);
407 Assert.That(m_lastErrorMessage, Is.Null); 407 Assert.That(m_lastErrorMessage, Is.Null);
408 408
409 TestLoadedRegion(part1, soundItemName, soundData); 409 TestLoadedRegion(part1, soundItemName, soundData);
@@ -451,8 +451,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
451 { 451 {
452 m_scene.EventManager.OnOarFileLoaded += LoadCompleted; 452 m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
453 m_archiverModule.DearchiveRegion(archiveReadStream); 453 m_archiverModule.DearchiveRegion(archiveReadStream);
454 Monitor.Wait(this, 60000);
455 } 454 }
455 Monitor.Wait(this, 60000);
456 456
457 Assert.That(m_lastErrorMessage, Is.Null); 457 Assert.That(m_lastErrorMessage, Is.Null);
458 458
@@ -501,11 +501,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
501 lock (this) 501 lock (this)
502 { 502 {
503 m_archiverModule.ArchiveRegion( 503 m_archiverModule.ArchiveRegion(
504 archiveWriteStream, requestId, new Dictionary<string, Object>() { { "wipe-owners", Boolean.TrueString } }); 504 archiveWriteStream, requestId, new Dictionary<string, Object>() { { "wipe-owners", Boolean.TrueString } });
505
506 Monitor.Wait(this, 60000);
507 } 505 }
508 506 Monitor.Wait(this, 60000);
507
509 Assert.That(m_lastRequestId, Is.EqualTo(requestId)); 508 Assert.That(m_lastRequestId, Is.EqualTo(requestId));
510 509
511 byte[] archive = archiveWriteStream.ToArray(); 510 byte[] archive = archiveWriteStream.ToArray();
@@ -535,6 +534,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
535 scene2.EventManager.OnOarFileLoaded += LoadCompleted; 534 scene2.EventManager.OnOarFileLoaded += LoadCompleted;
536 archiverModule.DearchiveRegion(archiveReadStream); 535 archiverModule.DearchiveRegion(archiveReadStream);
537 } 536 }
537 Monitor.Wait(this, 60000);
538 538
539 Assert.That(m_lastErrorMessage, Is.Null); 539 Assert.That(m_lastErrorMessage, Is.Null);
540 540
@@ -600,6 +600,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
600 m_scene.EventManager.OnOarFileLoaded += LoadCompleted; 600 m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
601 m_archiverModule.DearchiveRegion(oarStream); 601 m_archiverModule.DearchiveRegion(oarStream);
602 } 602 }
603 Monitor.Wait(this, 60000);
603 604
604 ILandObject rLo = m_scene.LandChannel.GetLandObject(16, 16); 605 ILandObject rLo = m_scene.LandChannel.GetLandObject(16, 16);
605 LandData rLd = rLo.LandData; 606 LandData rLd = rLo.LandData;
@@ -671,8 +672,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
671 { 672 {
672 m_scene.EventManager.OnOarFileLoaded += LoadCompleted; 673 m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
673 m_archiverModule.DearchiveRegion(archiveReadStream); 674 m_archiverModule.DearchiveRegion(archiveReadStream);
674 Monitor.Wait(this, 60000);
675 } 675 }
676 Monitor.Wait(this, 60000);
676 677
677 Assert.That(m_lastErrorMessage, Is.Null); 678 Assert.That(m_lastErrorMessage, Is.Null);
678 RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings; 679 RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings;
@@ -742,13 +743,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
742 m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false); 743 m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false);
743 744
744 // Write out this scene 745 // Write out this scene
745 scene.EventManager.OnOarFileSaved += SaveCompleted;
746 746
747 lock (this) 747 lock (this)
748 { 748 {
749 scene.EventManager.OnOarFileSaved += SaveCompleted;
749 m_archiverModule.ArchiveRegion(archiveWriteStream); 750 m_archiverModule.ArchiveRegion(archiveWriteStream);
750 Monitor.Wait(this, 60000);
751 } 751 }
752 Monitor.Wait(this, 60000);
752 } 753 }
753 754
754 { 755 {
@@ -765,8 +766,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
765 Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); 766 Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
766 archiveOptions.Add("merge", null); 767 archiveOptions.Add("merge", null);
767 m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions); 768 m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions);
768 Monitor.Wait(this, 60000);
769 } 769 }
770 Monitor.Wait(this, 60000);
770 771
771 SceneObjectPart object1Existing = m_scene.GetSceneObjectPart(part1.Name); 772 SceneObjectPart object1Existing = m_scene.GetSceneObjectPart(part1.Name);
772 Assert.That(object1Existing, Is.Not.Null, "object1 was not present after merge"); 773 Assert.That(object1Existing, Is.Not.Null, "object1 was not present after merge");
@@ -839,7 +840,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
839 840
840 // Save OAR 841 // Save OAR
841 MemoryStream archiveWriteStream = new MemoryStream(); 842 MemoryStream archiveWriteStream = new MemoryStream();
842 m_scene.EventManager.OnOarFileSaved += SaveCompleted;
843 843
844 Guid requestId = new Guid("00000000-0000-0000-0000-808080808080"); 844 Guid requestId = new Guid("00000000-0000-0000-0000-808080808080");
845 845
@@ -848,9 +848,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
848 848
849 lock (this) 849 lock (this)
850 { 850 {
851 m_scene.EventManager.OnOarFileSaved += SaveCompleted;
851 m_archiverModule.ArchiveRegion(archiveWriteStream, requestId, options); 852 m_archiverModule.ArchiveRegion(archiveWriteStream, requestId, options);
852 Monitor.Wait(this, 60000);
853 } 853 }
854 Monitor.Wait(this, 60000);
854 855
855 856
856 // Check that the OAR contains the expected data 857 // Check that the OAR contains the expected data
@@ -1023,8 +1024,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
1023 Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); 1024 Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
1024 archiveOptions.Add("merge", null); 1025 archiveOptions.Add("merge", null);
1025 m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions); 1026 m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions);
1026 Monitor.Wait(this, 60000);
1027 } 1027 }
1028 Monitor.Wait(this, 60000);
1028 1029
1029 Assert.That(m_lastErrorMessage, Is.Null); 1030 Assert.That(m_lastErrorMessage, Is.Null);
1030 1031