aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-02-17 16:25:59 +0000
committerJustin Clarke Casey2009-02-17 16:25:59 +0000
commit014e9e2c6d7ff53bb6f511e7ece9a1e2685663a0 (patch)
tree4732a69b1b36e43f820b26f53444ede0c27054cc
parent* Ignored even more gens (diff)
downloadopensim-SC_OLD-014e9e2c6d7ff53bb6f511e7ece9a1e2685663a0.zip
opensim-SC_OLD-014e9e2c6d7ff53bb6f511e7ece9a1e2685663a0.tar.gz
opensim-SC_OLD-014e9e2c6d7ff53bb6f511e7ece9a1e2685663a0.tar.bz2
opensim-SC_OLD-014e9e2c6d7ff53bb6f511e7ece9a1e2685663a0.tar.xz
* Get rid of a unit test race condition based on my misreading of the AutoResetEvent docs
* Hopefully this will reduce the spike in build failures seen in the past few days (since I introduced an addition oar test)
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
index c49a1f6..25fffc4 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
@@ -43,11 +43,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
43 [TestFixture] 43 [TestFixture]
44 public class ArchiverTests 44 public class ArchiverTests
45 { 45 {
46 private EventWaitHandle m_waitHandle = new AutoResetEvent(false); 46 private EventWaitHandle m_waitHandle = new ManualResetEvent(false);
47 47
48 private void SaveCompleted(string errorMessage) 48 private void SaveCompleted(string errorMessage)
49 { 49 {
50 m_waitHandle.Set(); 50 m_waitHandle.Set();
51 } 51 }
52 52
53 /// <summary> 53 /// <summary>
@@ -108,6 +108,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
108 scene.EventManager.OnOarFileSaved += SaveCompleted; 108 scene.EventManager.OnOarFileSaved += SaveCompleted;
109 archiverModule.ArchiveRegion(archiveWriteStream); 109 archiverModule.ArchiveRegion(archiveWriteStream);
110 m_waitHandle.WaitOne(60000, true); 110 m_waitHandle.WaitOne(60000, true);
111 m_waitHandle.Reset();
111 112
112 byte[] archive = archiveWriteStream.ToArray(); 113 byte[] archive = archiveWriteStream.ToArray();
113 MemoryStream archiveReadStream = new MemoryStream(archive); 114 MemoryStream archiveReadStream = new MemoryStream(archive);
@@ -252,6 +253,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
252 scene.EventManager.OnOarFileSaved += SaveCompleted; 253 scene.EventManager.OnOarFileSaved += SaveCompleted;
253 archiverModule.ArchiveRegion(archiveWriteStream); 254 archiverModule.ArchiveRegion(archiveWriteStream);
254 m_waitHandle.WaitOne(60000, true); 255 m_waitHandle.WaitOne(60000, true);
256 m_waitHandle.Reset();
255 } 257 }
256 258
257 { 259 {