diff options
author | Sean Dague | 2008-09-18 15:39:22 +0000 |
---|---|---|
committer | Sean Dague | 2008-09-18 15:39:22 +0000 |
commit | 232d1af6634c590bc38f6f43c8e15ed9b553414f (patch) | |
tree | 73cc926e30e9da10c7670d03d6b867f73ca3fa59 | |
parent | Kan-Ed fix series. (diff) | |
download | opensim-SC-232d1af6634c590bc38f6f43c8e15ed9b553414f.zip opensim-SC-232d1af6634c590bc38f6f43c8e15ed9b553414f.tar.gz opensim-SC-232d1af6634c590bc38f6f43c8e15ed9b553414f.tar.bz2 opensim-SC-232d1af6634c590bc38f6f43c8e15ed9b553414f.tar.xz |
add some comments and some try blocks around object storage
in the hopes this will help debug why this is failing for some people.
-rw-r--r-- | OpenSim/Data/Tests/BasicRegionTest.cs | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs index 7b5284a..b5e9ed4 100644 --- a/OpenSim/Data/Tests/BasicRegionTest.cs +++ b/OpenSim/Data/Tests/BasicRegionTest.cs | |||
@@ -77,12 +77,31 @@ namespace OpenSim.Data.Tests | |||
77 | { | 77 | { |
78 | SceneObjectGroup sog = NewSOG("object1"); | 78 | SceneObjectGroup sog = NewSOG("object1"); |
79 | SceneObjectGroup sog2 = NewSOG("object2"); | 79 | SceneObjectGroup sog2 = NewSOG("object2"); |
80 | 80 | ||
81 | db.StoreObject(sog, region1); | 81 | // in case the objects don't store |
82 | db.StoreObject(sog2, region1); | 82 | try |
83 | { | ||
84 | db.StoreObject(sog, region1); | ||
85 | } | ||
86 | catch (Exception e) | ||
87 | { | ||
88 | System.Console.WriteLine("Exception in storing object {0} {1}", sog.ToString(), e); | ||
89 | Assert.Fail(); | ||
90 | } | ||
91 | |||
92 | try | ||
93 | { | ||
94 | db.StoreObject(sog2, region1); | ||
95 | } | ||
96 | catch (Exception e) | ||
97 | { | ||
98 | System.Console.WriteLine("Exception in storing object {0} {1}", sog2.ToString(), e); | ||
99 | Assert.Fail(); | ||
100 | } | ||
83 | 101 | ||
84 | // This tests the ADO.NET driver | 102 | // This tests the ADO.NET driver |
85 | List<SceneObjectGroup> objs = db.LoadObjects(region1); | 103 | List<SceneObjectGroup> objs = db.LoadObjects(region1); |
104 | |||
86 | Assert.That(objs.Count, Is.EqualTo(2)); | 105 | Assert.That(objs.Count, Is.EqualTo(2)); |
87 | } | 106 | } |
88 | 107 | ||
@@ -182,6 +201,10 @@ namespace OpenSim.Data.Tests | |||
182 | return null; | 201 | return null; |
183 | } | 202 | } |
184 | 203 | ||
204 | // This builds a minimalistic Prim, 1 SOG with 1 root SOP. A | ||
205 | // common failure case is people adding new fields that aren't | ||
206 | // initialized, but have non-null db constraints. We should | ||
207 | // honestly be passing more and more null things in here. | ||
185 | private SceneObjectGroup NewSOG(string name) | 208 | private SceneObjectGroup NewSOG(string name) |
186 | { | 209 | { |
187 | SceneObjectGroup sog = new SceneObjectGroup(); | 210 | SceneObjectGroup sog = new SceneObjectGroup(); |