aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-28 19:39:46 +0000
committerJustin Clarke Casey2008-11-28 19:39:46 +0000
commit71e05a5707f1eaed098592dc1c3feb3389731634 (patch)
tree40ec2c07c2dbca6ff32a27c3e216ece22746f30d /OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
parent* test: Separate out async deletion methods to test delete and take copy sepa... (diff)
downloadopensim-SC-71e05a5707f1eaed098592dc1c3feb3389731634.zip
opensim-SC-71e05a5707f1eaed098592dc1c3feb3389731634.tar.gz
opensim-SC-71e05a5707f1eaed098592dc1c3feb3389731634.tar.bz2
opensim-SC-71e05a5707f1eaed098592dc1c3feb3389731634.tar.xz
* test: Add a wodge of code in order to be able to slightly extend a test to deliver a taken object to a user inventory folder without throwing an exception
* test doesn't actually double check for the presence of the item yet
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs18
1 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
index 51be872..468a4ad 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
@@ -29,6 +29,7 @@ using Nini.Config;
29using OpenMetaverse; 29using OpenMetaverse;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Framework.Communications; 31using OpenSim.Framework.Communications;
32using OpenSim.Framework.Communications.Cache;
32using OpenSim.Framework.Servers; 33using OpenSim.Framework.Servers;
33using OpenSim.Region.Physics.Manager; 34using OpenSim.Region.Physics.Manager;
34using OpenSim.Region.Environment.Scenes; 35using OpenSim.Region.Environment.Scenes;
@@ -52,15 +53,20 @@ namespace OpenSim.Region.Environment.Scenes.Tests
52 53
53 AgentCircuitManager acm = new AgentCircuitManager(); 54 AgentCircuitManager acm = new AgentCircuitManager();
54 CommunicationsManager cm = new TestCommunicationsManager(); 55 CommunicationsManager cm = new TestCommunicationsManager();
55 SceneCommunicationService scs = new SceneCommunicationService(cm); 56 SceneCommunicationService scs = new SceneCommunicationService(cm);
57
58 SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin());
59 AssetCache ac = new AssetCache(assetService);
60
56 StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", ""); 61 StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", "");
57 BaseHttpServer httpServer = new BaseHttpServer(666); 62 BaseHttpServer httpServer = new BaseHttpServer(666);
58 IConfigSource configSource = new IniConfigSource(); 63 IConfigSource configSource = new IniConfigSource();
59 64
60 TestScene testScene = new TestScene( 65 TestScene testScene = new TestScene(
61 regInfo, acm, cm, scs, null, sm, httpServer, null, false, false, false, configSource, null); 66 regInfo, acm, cm, scs, ac, sm, httpServer, null, false, false, false, configSource, null);
62 67
63 testScene.LandChannel = new TestLandChannel(); 68 testScene.LandChannel = new TestLandChannel();
69 testScene.LoadWorldMap();
64 70
65 PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager(); 71 PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
66 physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll"); 72 physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll");
@@ -93,7 +99,8 @@ namespace OpenSim.Region.Environment.Scenes.Tests
93 99
94 scene.NewUserConnection(agent); 100 scene.NewUserConnection(agent);
95 IClientAPI client = new TestClient(agent); 101 IClientAPI client = new TestClient(agent);
96 scene.AddNewClient(client, false); 102 scene.AddNewClient(client, true);
103 scene.AgentCrossing(agent.AgentID, new Vector3(90, 90, 90), false);
97 104
98 return client; 105 return client;
99 } 106 }
@@ -123,15 +130,16 @@ namespace OpenSim.Region.Environment.Scenes.Tests
123 /// <param name="scene"></param> 130 /// <param name="scene"></param>
124 /// <param name="part"></param> 131 /// <param name="part"></param>
125 /// <param name="action"></param> 132 /// <param name="action"></param>
133 /// <param name="destinationId"></param>
126 /// <param name="client"></param> 134 /// <param name="client"></param>
127 public static void DeleteSceneObjectAsync( 135 public static void DeleteSceneObjectAsync(
128 TestScene scene, SceneObjectPart part, DeRezAction action, IClientAPI client) 136 TestScene scene, SceneObjectPart part, DeRezAction action, UUID destinationId, IClientAPI client)
129 { 137 {
130 // Turn off the timer on the async sog deleter - we'll crank it by hand within a unit test 138 // Turn off the timer on the async sog deleter - we'll crank it by hand within a unit test
131 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 139 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
132 sogd.Enabled = false; 140 sogd.Enabled = false;
133 141
134 scene.DeRezObject(client, part.LocalId, UUID.Zero, action, UUID.Zero); 142 scene.DeRezObject(client, part.LocalId, UUID.Zero, action, destinationId);
135 sogd.InventoryDeQueueAndDelete(); 143 sogd.InventoryDeQueueAndDelete();
136 } 144 }
137 } 145 }