aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Permissions
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Tests/Permissions/DirectTransferTests.cs7
-rw-r--r--OpenSim/Tests/Permissions/IndirectTransferTests.cs9
2 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Tests/Permissions/DirectTransferTests.cs b/OpenSim/Tests/Permissions/DirectTransferTests.cs
index c68bbdf..0f251db 100644
--- a/OpenSim/Tests/Permissions/DirectTransferTests.cs
+++ b/OpenSim/Tests/Permissions/DirectTransferTests.cs
@@ -44,6 +44,13 @@ namespace OpenSim.Tests.Permissions
44 [SetUp] 44 [SetUp]
45 public void SetUp() 45 public void SetUp()
46 { 46 {
47 // In case we're dealing with some older version of nunit
48 if (Common.TheInstance == null)
49 {
50 Common.TheInstance = new Common();
51 Common.TheInstance.SetUp();
52 }
53
47 Common.TheInstance.DeleteObjectsFolders(); 54 Common.TheInstance.DeleteObjectsFolders();
48 } 55 }
49 56
diff --git a/OpenSim/Tests/Permissions/IndirectTransferTests.cs b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
index 7d8027f..fb96b8b 100644
--- a/OpenSim/Tests/Permissions/IndirectTransferTests.cs
+++ b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
@@ -46,6 +46,12 @@ namespace OpenSim.Tests.Permissions
46 [SetUp] 46 [SetUp]
47 public void SetUp() 47 public void SetUp()
48 { 48 {
49 // In case we're dealing with some older version of nunit
50 if (Common.TheInstance == null)
51 {
52 Common.TheInstance = new Common();
53 Common.TheInstance.SetUp();
54 }
49 Common.TheInstance.DeleteObjectsFolders(); 55 Common.TheInstance.DeleteObjectsFolders();
50 } 56 }
51 57
@@ -74,6 +80,7 @@ namespace OpenSim.Tests.Permissions
74 // Try A2 takes copies of objects that cannot be copied. 80 // Try A2 takes copies of objects that cannot be copied.
75 for (int i = 0; i < 6; i++) 81 for (int i = 0; i < 6; i++)
76 TakeOneBox(Common.TheScene.GetSceneObjectGroups(), names[i], perms[i]); 82 TakeOneBox(Common.TheScene.GetSceneObjectGroups(), names[i], perms[i]);
83 // Ad-hoc. Enough time to let the take work.
77 Thread.Sleep(5000); 84 Thread.Sleep(5000);
78 85
79 List<InventoryItemBase> items = Common.TheScene.InventoryService.GetFolderItems(Common.TheAvatars[1].UUID, objsFolder.ID); 86 List<InventoryItemBase> items = Common.TheScene.InventoryService.GetFolderItems(Common.TheAvatars[1].UUID, objsFolder.ID);
@@ -86,6 +93,7 @@ namespace OpenSim.Tests.Permissions
86 // Try A2 takes copies of objects that can be copied. 93 // Try A2 takes copies of objects that can be copied.
87 for (int i = 0; i < 6; i++) 94 for (int i = 0; i < 6; i++)
88 TakeOneBox(Common.TheScene.GetSceneObjectGroups(), names[i], perms[i]); 95 TakeOneBox(Common.TheScene.GetSceneObjectGroups(), names[i], perms[i]);
96 // Ad-hoc. Enough time to let the take work.
89 Thread.Sleep(5000); 97 Thread.Sleep(5000);
90 98
91 items = Common.TheScene.InventoryService.GetFolderItems(Common.TheAvatars[1].UUID, objsFolder.ID); 99 items = Common.TheScene.InventoryService.GetFolderItems(Common.TheAvatars[1].UUID, objsFolder.ID);
@@ -101,6 +109,7 @@ namespace OpenSim.Tests.Permissions
101 109
102 private void TakeOneBox(List<SceneObjectGroup> objs, string name, PermissionMask mask) 110 private void TakeOneBox(List<SceneObjectGroup> objs, string name, PermissionMask mask)
103 { 111 {
112 // Find the object inworld
104 SceneObjectGroup box = objs.Find(sog => sog.Name == name && sog.OwnerID == Common.TheAvatars[0].UUID); 113 SceneObjectGroup box = objs.Find(sog => sog.Name == name && sog.OwnerID == Common.TheAvatars[0].UUID);
105 Assert.That(box, Is.Not.Null, name); 114 Assert.That(box, Is.Not.Null, name);
106 115