diff options
author | Teravus Ovares (Dan Olivares) | 2009-09-04 20:19:50 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-09-04 20:19:50 -0400 |
commit | 2c09634aed3c270412159cd11f34f3d49c5154ba (patch) | |
tree | bb8b434fe20d325781032e27f1770f92299ad746 /OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |
parent | * Fixes various quirks rezzing in virtual regions. (diff) | |
parent | Add ids to iar requests (diff) | |
download | opensim-SC_OLD-2c09634aed3c270412159cd11f34f3d49c5154ba.zip opensim-SC_OLD-2c09634aed3c270412159cd11f34f3d49c5154ba.tar.gz opensim-SC_OLD-2c09634aed3c270412159cd11f34f3d49c5154ba.tar.bz2 opensim-SC_OLD-2c09634aed3c270412159cd11f34f3d49c5154ba.tar.xz |
Merge branch 'master' of ssh://MyConnection/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 066c5d3..a151c9d 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -55,6 +55,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
55 | [TestFixture] | 55 | [TestFixture] |
56 | public class InventoryArchiverTests | 56 | public class InventoryArchiverTests |
57 | { | 57 | { |
58 | protected ManualResetEvent mre = new ManualResetEvent(false); | ||
59 | |||
58 | private void InventoryReceived(UUID userId) | 60 | private void InventoryReceived(UUID userId) |
59 | { | 61 | { |
60 | lock (this) | 62 | lock (this) |
@@ -64,12 +66,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
64 | } | 66 | } |
65 | 67 | ||
66 | private void SaveCompleted( | 68 | private void SaveCompleted( |
67 | bool succeeded, CachedUserInfo userInfo, string invPath, Stream saveStream, Exception reportedException) | 69 | Guid id, bool succeeded, CachedUserInfo userInfo, string invPath, Stream saveStream, |
70 | Exception reportedException) | ||
68 | { | 71 | { |
69 | lock (this) | 72 | mre.Set(); |
70 | { | ||
71 | Monitor.PulseAll(this); | ||
72 | } | ||
73 | } | 73 | } |
74 | 74 | ||
75 | /// <summary> | 75 | /// <summary> |
@@ -152,11 +152,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
152 | MemoryStream archiveWriteStream = new MemoryStream(); | 152 | MemoryStream archiveWriteStream = new MemoryStream(); |
153 | archiverModule.OnInventoryArchiveSaved += SaveCompleted; | 153 | archiverModule.OnInventoryArchiveSaved += SaveCompleted; |
154 | 154 | ||
155 | lock (this) | 155 | mre.Reset(); |
156 | { | 156 | archiverModule.ArchiveInventory( |
157 | archiverModule.ArchiveInventory(userFirstName, userLastName, "Objects", archiveWriteStream); | 157 | Guid.NewGuid(), userFirstName, userLastName, "Objects", archiveWriteStream); |
158 | Monitor.Wait(this, 60000); | 158 | mre.WaitOne(); |
159 | } | ||
160 | 159 | ||
161 | byte[] archive = archiveWriteStream.ToArray(); | 160 | byte[] archive = archiveWriteStream.ToArray(); |
162 | MemoryStream archiveReadStream = new MemoryStream(archive); | 161 | MemoryStream archiveReadStream = new MemoryStream(archive); |