aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs30
1 files changed, 21 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
index 1056865..db78da9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
@@ -82,7 +82,25 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
82 82
83 protected string m_item1Name = "Ray Gun Item"; 83 protected string m_item1Name = "Ray Gun Item";
84 protected string m_coaItemName = "Coalesced Item"; 84 protected string m_coaItemName = "Coalesced Item";
85 85
86 [TestFixtureSetUp]
87 public void FixtureSetup()
88 {
89 // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread.
90 Util.FireAndForgetMethod = FireAndForgetMethod.RegressionTest;
91
92 ConstructDefaultIarBytesForTestLoad();
93 }
94
95 [TestFixtureTearDown]
96 public void TearDown()
97 {
98 // We must set this back afterwards, otherwise later tests will fail since they're expecting multiple
99 // threads. Possibly, later tests should be rewritten so none of them require async stuff (which regression
100 // tests really shouldn't).
101 Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod;
102 }
103
86 [SetUp] 104 [SetUp]
87 public override void SetUp() 105 public override void SetUp()
88 { 106 {
@@ -90,12 +108,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
90 m_iarStream = new MemoryStream(m_iarStreamBytes); 108 m_iarStream = new MemoryStream(m_iarStreamBytes);
91 } 109 }
92 110
93 [TestFixtureSetUp]
94 public void FixtureSetup()
95 {
96 ConstructDefaultIarBytesForTestLoad();
97 }
98
99 protected void ConstructDefaultIarBytesForTestLoad() 111 protected void ConstructDefaultIarBytesForTestLoad()
100 { 112 {
101// log4net.Config.XmlConfigurator.Configure(); 113// log4net.Config.XmlConfigurator.Configure();
@@ -122,7 +134,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
122 item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020"); 134 item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020");
123 item1.AssetID = asset1.FullID; 135 item1.AssetID = asset1.FullID;
124 item1.GroupID = UUID.Random(); 136 item1.GroupID = UUID.Random();
125 item1.CreatorIdAsUuid = m_uaLL1.PrincipalID; 137 item1.CreatorId = m_uaLL1.PrincipalID.ToString();
126 item1.Owner = m_uaLL1.PrincipalID; 138 item1.Owner = m_uaLL1.PrincipalID;
127 item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; 139 item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
128 scene.AddInventoryItem(item1); 140 scene.AddInventoryItem(item1);
@@ -145,7 +157,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
145 coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180"); 157 coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180");
146 coaItem.AssetID = coaAsset.FullID; 158 coaItem.AssetID = coaAsset.FullID;
147 coaItem.GroupID = UUID.Random(); 159 coaItem.GroupID = UUID.Random();
148 coaItem.CreatorIdAsUuid = m_uaLL1.PrincipalID; 160 coaItem.CreatorId = m_uaLL1.PrincipalID.ToString();
149 coaItem.Owner = m_uaLL1.PrincipalID; 161 coaItem.Owner = m_uaLL1.PrincipalID;
150 coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; 162 coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
151 scene.AddInventoryItem(coaItem); 163 scene.AddInventoryItem(coaItem);