From bb92ba97c6952c60f5bdd50b1c6599894bfef501 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 12 Nov 2009 18:26:22 +0000 Subject: Stop iar save failing on corrupt assets Not ideal since one will still have to watch out for big 'corrupt asset' messages in the log, but better than an outright fail --- OpenSim/Tests/Common/Mock/TestAssetService.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Tests/Common') diff --git a/OpenSim/Tests/Common/Mock/TestAssetService.cs b/OpenSim/Tests/Common/Mock/TestAssetService.cs index ff75d86..a537b97 100644 --- a/OpenSim/Tests/Common/Mock/TestAssetService.cs +++ b/OpenSim/Tests/Common/Mock/TestAssetService.cs @@ -27,6 +27,8 @@ using System; using System.Collections.Generic; +using System.Reflection; +using log4net; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Data; @@ -37,6 +39,8 @@ namespace OpenSim.Tests.Common.Mock { public class TestAssetService : IAssetService { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private readonly Dictionary Assets = new Dictionary(); public TestAssetService() {} @@ -50,6 +54,8 @@ namespace OpenSim.Tests.Common.Mock public AssetBase Get(string id) { + m_log.DebugFormat("[MOCK ASSET SERVICE]: Getting asset with id {0}", id); + AssetBase asset; if (Assets.ContainsKey(id)) asset = Assets[id]; @@ -78,6 +84,8 @@ namespace OpenSim.Tests.Common.Mock public string Store(AssetBase asset) { + m_log.DebugFormat("[MOCK ASSET SERVICE]: Storing asset {0}", asset.ID); + Assets[asset.ID] = asset; return asset.ID; -- cgit v1.1