* 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)0.6.3-post-fixes
parent
8a39223320
commit
014e9e2c6d
|
@ -43,11 +43,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
|||
[TestFixture]
|
||||
public class ArchiverTests
|
||||
{
|
||||
private EventWaitHandle m_waitHandle = new AutoResetEvent(false);
|
||||
private EventWaitHandle m_waitHandle = new ManualResetEvent(false);
|
||||
|
||||
private void SaveCompleted(string errorMessage)
|
||||
{
|
||||
m_waitHandle.Set();
|
||||
m_waitHandle.Set();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -108,6 +108,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
|||
scene.EventManager.OnOarFileSaved += SaveCompleted;
|
||||
archiverModule.ArchiveRegion(archiveWriteStream);
|
||||
m_waitHandle.WaitOne(60000, true);
|
||||
m_waitHandle.Reset();
|
||||
|
||||
byte[] archive = archiveWriteStream.ToArray();
|
||||
MemoryStream archiveReadStream = new MemoryStream(archive);
|
||||
|
@ -252,6 +253,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
|||
scene.EventManager.OnOarFileSaved += SaveCompleted;
|
||||
archiverModule.ArchiveRegion(archiveWriteStream);
|
||||
m_waitHandle.WaitOne(60000, true);
|
||||
m_waitHandle.Reset();
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue