From 6f077d5e5f9929f6593850dc096983dcf237e387 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Wed, 26 Aug 2009 21:05:46 -0400 Subject: * Another attempt at fixing the random spurious test error. * This time it might be the listening socket thread from HttpServer aborting with a non blocking thread abort exception. Hopefully calling Stop() on MainServer.Instance will solve that. --- OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs | 6 ++++++ .../Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs | 11 +++++++++++ 2 files changed, 17 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs index 3ee6007..8cd1d55 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs @@ -378,6 +378,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(presence.HasAttachments(), Is.True, "Presence has not received new objects"); } + [TearDown] + public void TearDown() + { + if (MainServer.Instance != null) MainServer.Instance.Stop(); + } + public static string GetRandomCapsObjectPath() { TestHelper.InMethod(); diff --git a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs index 23eab90..1d460dd 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs @@ -78,6 +78,17 @@ namespace OpenSim.Region.Framework.Scenes.Tests // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); } + [TearDown] + public void TearDown() + { + try + { + if (MainServer.Instance != null) MainServer.Instance.Stop(); + } + catch (NullReferenceException) + { } + } + } public class ThreadRunResults -- cgit v1.1 From 40fbdaaac4a43f76d99422c2eb382db8d941d14d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 27 Aug 2009 21:25:16 +0100 Subject: Apply http://opensimulator.org/mantis/view.php?id=3829 Fix file access violation on Flotsam cache Thanks mcortez --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index c7723f1..4b582c2 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -361,7 +361,7 @@ namespace Flotsam.RegionModules.AssetCache { try { - FileStream stream = File.Open(filename, FileMode.Open); + FileStream stream = File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.Read); BinaryFormatter bformatter = new BinaryFormatter(); asset = (AssetBase)bformatter.Deserialize(stream); -- cgit v1.1 From d704e62b392763a0aa77543e6fa849c65db262ad Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 27 Aug 2009 21:49:32 +0100 Subject: Remove OpenSim.ini comments from the top of FlotsamAssetCache.cs to avoid duplication and divergence with config-include/FlotsamCache.ini.example --- .../Region/CoreModules/Asset/FlotsamAssetCache.cs | 51 ---------------------- 1 file changed, 51 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 4b582c2..c91b63e 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -53,57 +53,6 @@ using OpenSim.Services.Interfaces; namespace Flotsam.RegionModules.AssetCache { - /// - /// OpenSim.ini Options: - /// ------- - /// [Modules] - /// AssetCaching = "FlotsamAssetCache" - /// - /// [AssetCache] - /// ; cache directory can be shared by multiple instances - /// CacheDirectory = /directory/writable/by/OpenSim/instance - /// - /// ; Log level - /// ; 0 - (Error) Errors only - /// ; 1 - (Info) Hit Rate Stats + Level 0 - /// ; 2 - (Debug) Cache Activity (Reads/Writes) + Level 1 - /// ; - /// LogLevel = 1 - /// - /// ; How often should hit rates be displayed (given in AssetRequests) - /// ; 0 to disable - /// HitRateDisplay = 100 - /// - /// ; Set to false for disk cache only. - /// MemoryCacheEnabled = true - /// - /// ; How long {in hours} to keep assets cached in memory, .5 == 30 minutes - /// MemoryCacheTimeout = 2 - /// - /// ; How long {in hours} to keep assets cached on disk, .5 == 30 minutes - /// ; Specify 0 if you do not want your disk cache to expire - /// FileCacheTimeout = 0 - /// - /// ; How often {in hours} should the disk be checked for expired filed - /// ; Specify 0 to disable expiration checking - /// FileCleanupTimer = .166 ;roughly every 10 minutes - /// - /// ; If WAIT_ON_INPROGRESS_REQUESTS has been defined then this specifies how - /// ; long (in miliseconds) to block a request thread while trying to complete - /// ; writing to disk. - /// WaitOnInprogressTimeout = 3000 - /// - /// ; Number of tiers to use for cache directories (current valid range 1 to 3) - /// CacheDirectoryTiers = 1 - /// - /// ; Number of letters per path tier, 1 will create 16 directories per tier, 2 - 256, 3 - 4096 and 4 - 65K - /// CacheDirectoryTierLength = 3 - /// - /// ; Warning level for cache directory size - /// CacheWarnAt = 30000 - /// ------- - /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] public class FlotsamAssetCache : ISharedRegionModule, IImprovedAssetCache { -- cgit v1.1