diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/Tests')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 165a607..3ffabbd 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -47,10 +47,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
47 | [TestFixture, LongRunning] | 47 | [TestFixture, LongRunning] |
48 | public class ArchiverTests | 48 | public class ArchiverTests |
49 | { | 49 | { |
50 | private void SaveCompleted(string errorMessage) | 50 | private Guid m_lastRequestId; |
51 | |||
52 | private void SaveCompleted(Guid requestId, string errorMessage) | ||
51 | { | 53 | { |
52 | lock (this) | 54 | lock (this) |
53 | { | 55 | { |
56 | m_lastRequestId = requestId; | ||
54 | System.Console.WriteLine("About to pulse ArchiverTests"); | 57 | System.Console.WriteLine("About to pulse ArchiverTests"); |
55 | Monitor.PulseAll(this); | 58 | Monitor.PulseAll(this); |
56 | } | 59 | } |
@@ -112,15 +115,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
112 | MemoryStream archiveWriteStream = new MemoryStream(); | 115 | MemoryStream archiveWriteStream = new MemoryStream(); |
113 | scene.EventManager.OnOarFileSaved += SaveCompleted; | 116 | scene.EventManager.OnOarFileSaved += SaveCompleted; |
114 | 117 | ||
118 | Guid requestId = new Guid("00000000-0000-0000-0000-808080808080"); | ||
119 | |||
115 | lock (this) | 120 | lock (this) |
116 | { | 121 | { |
117 | archiverModule.ArchiveRegion(archiveWriteStream); | 122 | archiverModule.ArchiveRegion(archiveWriteStream, requestId); |
118 | AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer; | 123 | AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer; |
119 | while (assetServer.HasWaitingRequests()) | 124 | while (assetServer.HasWaitingRequests()) |
120 | assetServer.ProcessNextRequest(); | 125 | assetServer.ProcessNextRequest(); |
121 | 126 | ||
122 | Monitor.Wait(this, 60000); | 127 | Monitor.Wait(this, 60000); |
123 | } | 128 | } |
129 | |||
130 | Assert.That(m_lastRequestId, Is.EqualTo(requestId)); | ||
124 | 131 | ||
125 | byte[] archive = archiveWriteStream.ToArray(); | 132 | byte[] archive = archiveWriteStream.ToArray(); |
126 | MemoryStream archiveReadStream = new MemoryStream(archive); | 133 | MemoryStream archiveReadStream = new MemoryStream(archive); |
@@ -303,7 +310,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
303 | byte[] archive = archiveWriteStream.ToArray(); | 310 | byte[] archive = archiveWriteStream.ToArray(); |
304 | MemoryStream archiveReadStream = new MemoryStream(archive); | 311 | MemoryStream archiveReadStream = new MemoryStream(archive); |
305 | 312 | ||
306 | archiverModule.DearchiveRegion(archiveReadStream, true); | 313 | archiverModule.DearchiveRegion(archiveReadStream, true, Guid.Empty); |
307 | 314 | ||
308 | SceneObjectPart object1Existing = scene.GetSceneObjectPart(part1Name); | 315 | SceneObjectPart object1Existing = scene.GetSceneObjectPart(part1Name); |
309 | Assert.That(object1Existing, Is.Not.Null, "object1 was not present after merge"); | 316 | Assert.That(object1Existing, Is.Not.Null, "object1 was not present after merge"); |