diff options
author | UbitUmarov | 2015-11-22 08:08:01 +0000 |
---|---|---|
committer | UbitUmarov | 2015-11-22 08:08:01 +0000 |
commit | e28eecd0bf547b278a3ccb587d597510c89a810a (patch) | |
tree | 740351da0196972b38f2f21602cf41cdb0cdd37c /OpenSim | |
parent | coment out merge option on multiregion oar load i added (diff) | |
download | opensim-SC_OLD-e28eecd0bf547b278a3ccb587d597510c89a810a.zip opensim-SC_OLD-e28eecd0bf547b278a3ccb587d597510c89a810a.tar.gz opensim-SC_OLD-e28eecd0bf547b278a3ccb587d597510c89a810a.tar.bz2 opensim-SC_OLD-e28eecd0bf547b278a3ccb587d597510c89a810a.tar.xz |
revert take the Monitor.wait out of the locks
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index d9ec23b..385510d 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); | ||
204 | } | 206 | } |
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); | ||
404 | } | 405 | } |
405 | 406 | ||
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); | ||
454 | } | 455 | } |
455 | Monitor.Wait(this, 60000); | ||
456 | 456 | ||
457 | Assert.That(m_lastErrorMessage, Is.Null); | 457 | Assert.That(m_lastErrorMessage, Is.Null); |
458 | 458 | ||
@@ -501,10 +501,11 @@ 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); | ||
505 | } | 507 | } |
506 | Monitor.Wait(this, 60000); | 508 | |
507 | |||
508 | Assert.That(m_lastRequestId, Is.EqualTo(requestId)); | 509 | Assert.That(m_lastRequestId, Is.EqualTo(requestId)); |
509 | 510 | ||
510 | byte[] archive = archiveWriteStream.ToArray(); | 511 | byte[] archive = archiveWriteStream.ToArray(); |
@@ -534,7 +535,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
534 | scene2.EventManager.OnOarFileLoaded += LoadCompleted; | 535 | scene2.EventManager.OnOarFileLoaded += LoadCompleted; |
535 | archiverModule.DearchiveRegion(archiveReadStream); | 536 | archiverModule.DearchiveRegion(archiveReadStream); |
536 | } | 537 | } |
537 | Monitor.Wait(this, 60000); | ||
538 | 538 | ||
539 | Assert.That(m_lastErrorMessage, Is.Null); | 539 | Assert.That(m_lastErrorMessage, Is.Null); |
540 | 540 | ||
@@ -600,7 +600,6 @@ 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); | ||
604 | 603 | ||
605 | ILandObject rLo = m_scene.LandChannel.GetLandObject(16, 16); | 604 | ILandObject rLo = m_scene.LandChannel.GetLandObject(16, 16); |
606 | LandData rLd = rLo.LandData; | 605 | LandData rLd = rLo.LandData; |
@@ -672,8 +671,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
672 | { | 671 | { |
673 | m_scene.EventManager.OnOarFileLoaded += LoadCompleted; | 672 | m_scene.EventManager.OnOarFileLoaded += LoadCompleted; |
674 | m_archiverModule.DearchiveRegion(archiveReadStream); | 673 | m_archiverModule.DearchiveRegion(archiveReadStream); |
674 | Monitor.Wait(this, 60000); | ||
675 | } | 675 | } |
676 | Monitor.Wait(this, 60000); | ||
677 | 676 | ||
678 | Assert.That(m_lastErrorMessage, Is.Null); | 677 | Assert.That(m_lastErrorMessage, Is.Null); |
679 | RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings; | 678 | RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings; |
@@ -743,13 +742,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
743 | m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false); | 742 | m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false); |
744 | 743 | ||
745 | // Write out this scene | 744 | // Write out this scene |
745 | scene.EventManager.OnOarFileSaved += SaveCompleted; | ||
746 | 746 | ||
747 | lock (this) | 747 | lock (this) |
748 | { | 748 | { |
749 | scene.EventManager.OnOarFileSaved += SaveCompleted; | ||
750 | m_archiverModule.ArchiveRegion(archiveWriteStream); | 749 | m_archiverModule.ArchiveRegion(archiveWriteStream); |
750 | Monitor.Wait(this, 60000); | ||
751 | } | 751 | } |
752 | Monitor.Wait(this, 60000); | ||
753 | } | 752 | } |
754 | 753 | ||
755 | { | 754 | { |
@@ -766,8 +765,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
766 | Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); | 765 | Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); |
767 | archiveOptions.Add("merge", null); | 766 | archiveOptions.Add("merge", null); |
768 | m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions); | 767 | m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions); |
768 | Monitor.Wait(this, 60000); | ||
769 | } | 769 | } |
770 | Monitor.Wait(this, 60000); | ||
771 | 770 | ||
772 | SceneObjectPart object1Existing = m_scene.GetSceneObjectPart(part1.Name); | 771 | SceneObjectPart object1Existing = m_scene.GetSceneObjectPart(part1.Name); |
773 | Assert.That(object1Existing, Is.Not.Null, "object1 was not present after merge"); | 772 | Assert.That(object1Existing, Is.Not.Null, "object1 was not present after merge"); |
@@ -840,6 +839,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
840 | 839 | ||
841 | // Save OAR | 840 | // Save OAR |
842 | MemoryStream archiveWriteStream = new MemoryStream(); | 841 | 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,10 +848,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
848 | 848 | ||
849 | lock (this) | 849 | lock (this) |
850 | { | 850 | { |
851 | m_scene.EventManager.OnOarFileSaved += SaveCompleted; | ||
852 | m_archiverModule.ArchiveRegion(archiveWriteStream, requestId, options); | 851 | m_archiverModule.ArchiveRegion(archiveWriteStream, requestId, options); |
852 | Monitor.Wait(this, 60000); | ||
853 | } | 853 | } |
854 | Monitor.Wait(this, 60000); | ||
855 | 854 | ||
856 | 855 | ||
857 | // Check that the OAR contains the expected data | 856 | // Check that the OAR contains the expected data |
@@ -1024,8 +1023,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
1024 | Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); | 1023 | Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); |
1025 | // archiveOptions.Add("merge", null); | 1024 | // archiveOptions.Add("merge", null); |
1026 | m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions); | 1025 | m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions); |
1026 | Monitor.Wait(this, 60000); | ||
1027 | } | 1027 | } |
1028 | Monitor.Wait(this, 60000); | ||
1029 | 1028 | ||
1030 | Assert.That(m_lastErrorMessage, Is.Null); | 1029 | Assert.That(m_lastErrorMessage, Is.Null); |
1031 | 1030 | ||