From d0744f8eca6adc2b6ae257f581792bd8eae16ea2 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 14 Apr 2009 18:49:45 +0000 Subject: * Make archiver tests pump the asset server manually instead of starting the normal runtime thread * This may eliminate the occasional archive test freezes, since they appeared to occur when somehow the asset server didn't pick up on the presence of a request in the asset quque --- .../Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 6 +++++- OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index c140ec0..01e5ae0 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests InventoryArchiverModule archiverModule = new InventoryArchiverModule(); - Scene scene = SceneSetupHelpers.SetupScene(); + Scene scene = SceneSetupHelpers.SetupScene(false); SceneSetupHelpers.SetupSceneModules(scene, archiverModule); CommunicationsManager cm = scene.CommsManager; @@ -119,6 +119,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests lock (this) { archiverModule.ArchiveInventory(userFirstName, userLastName, "Objects", archiveWriteStream); + AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer; + while (assetServer.HasWaitingRequests()) + assetServer.ProcessNextRequest(); + Monitor.Wait(this, 60000); } diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 04c3289..165a607 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs @@ -34,6 +34,7 @@ using NUnit.Framework; using NUnit.Framework.SyntaxHelpers; using OpenMetaverse; using OpenSim.Framework; +using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Serialization; using OpenSim.Region.CoreModules.World.Serialiser; using OpenSim.Region.CoreModules.World.Terrain; @@ -67,7 +68,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests SerialiserModule serialiserModule = new SerialiserModule(); TerrainModule terrainModule = new TerrainModule(); - Scene scene = SceneSetupHelpers.SetupScene(); + Scene scene = SceneSetupHelpers.SetupScene(false); SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule); SceneObjectPart part1; @@ -114,6 +115,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests lock (this) { archiverModule.ArchiveRegion(archiveWriteStream); + AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer; + while (assetServer.HasWaitingRequests()) + assetServer.ProcessNextRequest(); + Monitor.Wait(this, 60000); } -- cgit v1.1