aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-11-12 18:26:22 +0000
committerJustin Clark-Casey (justincc)2009-11-12 18:26:22 +0000
commitbb92ba97c6952c60f5bdd50b1c6599894bfef501 (patch)
tree6d1cce7b98b06549fc91dbdafa94c42f64437c5b /OpenSim/Tests/Common
parentminor: refactor common setup in uuid gatherer test (diff)
downloadopensim-SC_OLD-bb92ba97c6952c60f5bdd50b1c6599894bfef501.zip
opensim-SC_OLD-bb92ba97c6952c60f5bdd50b1c6599894bfef501.tar.gz
opensim-SC_OLD-bb92ba97c6952c60f5bdd50b1c6599894bfef501.tar.bz2
opensim-SC_OLD-bb92ba97c6952c60f5bdd50b1c6599894bfef501.tar.xz
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
Diffstat (limited to 'OpenSim/Tests/Common')
-rw-r--r--OpenSim/Tests/Common/Mock/TestAssetService.cs8
1 files changed, 8 insertions, 0 deletions
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 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection;
31using log4net;
30using OpenMetaverse; 32using OpenMetaverse;
31using OpenSim.Framework; 33using OpenSim.Framework;
32using OpenSim.Data; 34using OpenSim.Data;
@@ -37,6 +39,8 @@ namespace OpenSim.Tests.Common.Mock
37{ 39{
38 public class TestAssetService : IAssetService 40 public class TestAssetService : IAssetService
39 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43
40 private readonly Dictionary<string, AssetBase> Assets = new Dictionary<string, AssetBase>(); 44 private readonly Dictionary<string, AssetBase> Assets = new Dictionary<string, AssetBase>();
41 45
42 public TestAssetService() {} 46 public TestAssetService() {}
@@ -50,6 +54,8 @@ namespace OpenSim.Tests.Common.Mock
50 54
51 public AssetBase Get(string id) 55 public AssetBase Get(string id)
52 { 56 {
57 m_log.DebugFormat("[MOCK ASSET SERVICE]: Getting asset with id {0}", id);
58
53 AssetBase asset; 59 AssetBase asset;
54 if (Assets.ContainsKey(id)) 60 if (Assets.ContainsKey(id))
55 asset = Assets[id]; 61 asset = Assets[id];
@@ -78,6 +84,8 @@ namespace OpenSim.Tests.Common.Mock
78 84
79 public string Store(AssetBase asset) 85 public string Store(AssetBase asset)
80 { 86 {
87 m_log.DebugFormat("[MOCK ASSET SERVICE]: Storing asset {0}", asset.ID);
88
81 Assets[asset.ID] = asset; 89 Assets[asset.ID] = asset;
82 90
83 return asset.ID; 91 return asset.ID;