Commit Graph

74 Commits (8b267b5bb547b807dd3cb6cd83ea03bd101e19ff)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 51043746f3 refactor: consistently put all test classes in the OpenSim.Tests.Common package rather than some in OpenSim.Tests.Common.Mock
the separate mock package was not useful and was just another using line to always add
2014-10-08 21:09:25 +01:00
Justin Clark-Casey (justincc) 319c51b8a8 Don't unnecessarily remove from backup objects that were not directly attached from the scene.
These are never in region backup in the first place since recent 11830c43
Extend regression test to check backup status.
2014-09-29 23:18:18 +01:00
Justin Clark-Casey (justincc) b16bc7b01c refactor: rename Scene.IncomingCloseAgent() to CloseAgent() in order to make it clear that all non-clientstack callers should be using this rather than RemoveClient() in order to step through the ScenePresence state machine properly.
Adds IScene.CloseAgent() to replace RemoveClient()
2013-09-27 19:14:21 +01:00
Justin Clark-Casey (justincc) f5d3145bea Add ScenePresenceTeleportTests.TestSameSimulatorIsolatedRegionsV2() regression test for v2 transfers.
Also adjusts names of teleport setup helpers in EntityTransferHelpers
2013-08-17 00:24:56 +01:00
Justin Clark-Casey (justincc) 1624522761 refactor: Make AttachmentModulesTests.TestSameSimulatorNeighbouringRegionsTeleportV2 use already available TestClient handle rather than retrieving it via the ScenePresence 2013-08-16 23:45:04 +01:00
Justin Clark-Casey (justincc) 60cc9e9a3c minor: remove unused entity transfer config in teleport v2 attachments test 2013-08-14 23:21:18 +01:00
Justin Clark-Casey (justincc) b64d3ecaed Create TestSameSimulatorNeighbouringRegionsTeleportV2() regression test for V2 transfer protocol. 2013-08-12 18:15:12 +01:00
Justin Clark-Casey (justincc) 056a6ee765 Fix regression tests relating to agent transfer by making simulator use last week's SIMULATOR/0.1 protocol for now. 2013-07-26 19:22:30 +01:00
Justin Clark-Casey (justincc) 2cb2f1d7e3 Fix issue where objects removed via llDie() would not disappear for users looking in from neighbouring sims.
This was because this particular code path (unlike user delete) only sent kills to root presences, for no apparent good reason.
Added regression test for this case.
This fixes http://opensimulator.org/mantis/view.php?id=6627
2013-05-09 18:02:19 +01:00
Justin Clark-Casey (justincc) 023faa227e Check viewer 2/3 attachment calls against avatar appearance attachment data rather than actually attached objects
By checking against the grid's Avatar data, we can ignore viewer side attachments but still initiate these calls simulator-side.
Initiating simulator-side is always necessary for version 1 viewers.
This is a further commit to resolve http://opensimulator.org/mantis/view.php?id=6581
2013-03-29 23:10:28 +00:00
Justin Clark-Casey (justincc) c92654fb43 Stop attempts to update/add existing attachments in user inventory when teleporting between regions.
This appears to resolve issues on teleport where attachments disappear or become labelled as invalid within user inventory.
2013-03-28 23:57:35 +00:00
Justin Clark-Casey (justincc) 36651bed71 On the later forms of teleport failure, tell the user if this was because viewer couldn't/didn't connect with destination or if destination didn't signal teleport completion.
Also adds regression test for the case where the viewer couldn't connect with the destination region.
Also refactoring of regression test support code associated with entity transfer in order to make this test possible and the code less obscure.
2013-03-20 23:01:16 +00:00
Melanie 55ab6f015a Fix tests for multiattach 2013-03-18 23:48:03 +00:00
Melanie 5e1f651e21 Merge branch 'master' into newmultiattach
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
2013-03-18 23:31:27 +00:00
Melanie fcecfc81bb Multiattach, part 1
Conflicts:

	OpenSim/Framework/AvatarAppearance.cs
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
	OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
	OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
	OpenSim/Region/Framework/Scenes/Scene.cs
	OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2013-03-18 22:56:03 +00:00
Justin Clark-Casey (justincc) 3611d33b00 Improve rejection of any attempt to reattach an object that is already attached.
This also adds/extends regression tests for wearing attachments directly for the scene and attempting to reattach/rewear already attached objects.
2013-03-18 22:04:27 +00:00
Justin Clark-Casey (justincc) a7a9a8a614 Fix recent regression where an item worn to an attachment point that was already occupied did not remove the previous attachment (current behaviour)
Regression was commit ccd6f4 (Tue Mar 5 23:47:36 2013)
Added regression test for this case.
2013-03-18 20:48:50 +00:00
Justin Clark-Casey (justincc) 818379ba14 Fire EventManager.TriggerOnAttach (and hence LSL attach event) when an object is attached from the scene.
Enables previously disabled regression test.
Based on SingpostMarv's patch in http://opensimulator.org/mantis/view.php?id=6302 but I prefer a simpler approach that does not expose a resume scripts option right now.
2012-09-29 01:14:23 +01:00
Justin Clark-Casey (justincc) d588467d5b Extend attachment regression test to check for appropriate attach event firing.
This reveals that the event is not being fired when an object is attached from ground, which is incorrect.
This check is temporairly disabled.
2012-09-29 00:07:11 +01:00
Justin Clark-Casey (justincc) 967d42d393 Correctly override and call base OpenSimTestCase.SetUp() method in GridConnectorsTests and ArchiverTests.
Remove unrelated compile warning from AttachmentsModuleTests.
2012-09-19 01:06:42 +01:00
Justin Clark-Casey (justincc) bcbd450fe4 Add --force flag to "kick user" console command to allow bypassing of recent race condition checks.
This is to allow a second attempt to remove an avatar even if "show connections" shows them as already inactive (i.e. close has already been attempted once).
You should only attempt --force if a normal kick fails.
This is partly for diagnostics as we have seen some connections occasionally remain on lbsa plaza even if they are registered as inactive.
This is not a permanent solution and may not work anyway - the ultimate solution is to stop this problem from happening in the first place.
2012-08-20 20:24:54 +01:00
Melanie fe4c3a37c0 Lay some groundwork for temp attachments. Decouple attachments from inventory. 2012-08-14 00:12:15 +01:00
Justin Clark-Casey (justincc) c846a5461c Remove bad using statement in AttachmentsModuleTests.
It seems that the mono 2.10.8.1 doesn't choke on this but for some reason 2.4.3 fails.
2012-07-24 22:46:22 +01:00
Justin Clark-Casey (justincc) c992629576 extend regression TestRezScriptedAttachmentFromInventory() to check actual start of script rather than just the script status reported by SOG.ContainsScripts() 2012-07-24 22:40:06 +01:00
Justin Clark-Casey (justincc) 2858b1b1f4 extend regression TestDetachScriptedAttachementToInventory() to check correct running status on a re-rezzed attachment 2012-07-24 22:33:54 +01:00
Justin Clark-Casey (justincc) 33cff9b9d7 Allow XEngine StartDelay to be configured in the [XEngine] config section.
This is only currently meant for use by regression tests that don't have any issues if XEngine is started up quickly, since no other operations will be occuring simultaneously.
Therefore, this is not yet documented externally.
2012-07-11 21:55:18 +01:00
Justin Clark-Casey (justincc) fc24563206 Add regression TestDetachScriptedAttachmentToInventory()
This currently only does a relatively crude check for a ScriptState node in the serialized xml
2012-07-11 21:43:35 +01:00
Justin Clark-Casey (justincc) 14d05dc2a9 Add regression TestRezScriptedAttachmentsFromInventory() though this currently only checks for the presence of script items, not for started scripts 2012-07-11 19:54:40 +01:00
Justin Clark-Casey (justincc) 2eaa6d5ace Do not allow a script to attach a prim if its being sat upon.
This prevents a stack overflow where a get position on the avatar will refer to the attachment which will in turn refer back to the avatar.
This required recording of all sitting avatars on a prim which is done separately from recording the sit target avatar.
Recording HashSet is null if there are no sitting avatars in order to save memory.
2012-07-09 21:24:32 +01:00
Justin Clark-Casey (justincc) 74014a3854 minor: Remove some wrong comments in attachments regression tests 2012-07-06 23:13:00 +01:00
Justin Clark-Casey (justincc) 056c9a59b2 Add assert to attachment regression tests to check that number of objects in the scene graph 2012-07-06 23:07:50 +01:00
Justin Clark-Casey (justincc) 951b45b80f Add OSSL function osForceAttachToAvatarFromInventory()
This works like osForceAttachToAvatar() but allows an object to be directly specified from the script object's inventory rather than forcing it to be rezzed in the scene first.
Still only attaches objects to the owner of the script.
This allows one to bypass the complicated co-ordination of first rezzing objects in the scene before attaching them.
Threat level high.
2012-07-05 00:05:06 +01:00
Justin Clark-Casey (justincc) bfa6896678 Change AttachmentsModule.DetachSingleAttachmentToInv() to accept a SOG directly instead of an item ID to then shuffle through attachments, saving CPU busywork.
Almost all callers already had the sog to hand.
Still checking that it's really an attachment, but now by inspecting SOG.AttachedAvatar
2012-06-28 23:31:23 +01:00
Justin Clark-Casey (justincc) 5bec5bcf71 Automatically disable log4net before each regression test so that logging is confined to a single test if it's turned on.
This involves making test classes inherit from a common OpenSimTestCase.
This will be applied to more classes as required.
2012-06-27 00:01:51 +01:00
Justin Clark-Casey (justincc) 99954c1498 refactor: Remove unnecessary AttachmentModuleTests.m_userId in favour of local variables 2012-06-26 22:53:08 +01:00
Justin Clark-Casey (justincc) 2b82c421ad refactor: Use local attachment module variables instead of global m_attMod.
This also avoids confusion between tests where one sets up m_attMod and another accidentally uses it after failing to set one up itself.
2012-06-26 22:31:25 +01:00
Justin Clark-Casey (justincc) 4329cc7b8a refactor: make m_presence a local variable in all AttachmentsModuleTests since it doesn't need to be global and some tests set up more than one sp 2012-06-26 22:21:54 +01:00
Justin Clark-Casey (justincc) 32a4ce94f0 Add regression test to check that attachments in source region are deleting when an agent teleports to a neighbouring region 2012-06-26 22:16:44 +01:00
Justin Clark-Casey (justincc) 798846c5b6 refactor AttachmentsModule tests to use a common method for standard attachment item setup 2012-06-22 00:40:04 +01:00
Justin Clark-Casey (justincc) 06617ffd06 Add regression test for updating attachment position 2012-06-22 00:18:30 +01:00
Justin Clark-Casey (justincc) ff429a259b Fix bug where an avatar that had an object they owned attached through llAttachToAvatar() or osForceAttachToAvatar() would wrongly have next permissions come into play when they detached that object and rezzed it in scene.
This is because the attachments module code was setting the 'object slam' bit by using PermissionMask.All
Solution here is to route the attachment item creation call through the existing inventory code in BasicInventoryAccessModule rather than copy/pasted code in AttachmentsModule itself.
2012-05-23 01:58:10 +01:00
Justin Clark-Casey (justincc) 07e62df558 Add regression test for teleporting an agent between separated regions on the same simulator.
This involves a large amount of change in test scene setup code to allow test scenes to share shared modules
SetupScene is now an instance method that requires an instantiation of SceneHelpers, though other SceneHelpers methods are still static
May split these out into separate classes in the future.
2012-04-27 00:58:54 +01:00
Justin Clark-Casey (justincc) 7d8bb33c5b Store FromItemID for attachments once on SOG instead of on every SOP and only ever using the root part entry.
This eliminates some pointless memory use.
2012-04-07 00:33:02 +01:00
Dan Lake 92c88121c7 Removed all refs to IClientAPI from IAttachmentsModule. Separated client handlers for attachments to call public interface and rearranged module file into sections 2011-10-04 14:40:39 -07:00
Dan Lake 460946ad62 Removed redundant code in AttachmentsModule and simplified interfaces which converted back and forth between ScenePresence and IClientAPI. More to be done still. 2011-10-03 16:44:32 -07:00
Justin Clark-Casey (justincc) bd991fc95f Don't try and delete attachments for child agent close 2011-09-13 22:54:50 +01:00
Justin Clark-Casey (justincc) 96a3b68086 Remember to set and unset the fire and forget method at the top of the attachment and npc tests 2011-09-08 20:59:52 +01:00
Justin Clark-Casey (justincc) b903d2ca96 In SetAttachment, if the existing attachment has no asset id then carry on rather than abort.
When a user logs in, the attachment item ids are pulled from persistence in the Avatars table.  However,
the asset ids are not saved.  When the avatar enters a simulator the attachments are set again.  If
we simply perform an item check then the asset ids (which are now present) are never set, and NPC attachments
later fail unless the attachment is detached and reattached.

Hopefully resolves part of http://opensimulator.org/mantis/view.php?id=5653
2011-09-06 01:59:21 +01:00
Justin Clark-Casey (justincc) 0cb0140a1d Stop the pointless double setting of every attachment in AvatarAppearance.
The second was already being filtered out so this has no user level effect
2011-09-06 00:29:37 +01:00
Justin Clark-Casey (justincc) 32444d98cb Make SP.Attachments available as sp.GetAttachments() instead.
The approach here, as in other parts of OpenSim, is to return a copy of the list rather than the attachments list itself
This prevents callers from forgetting to lock the list when they read it, as was happening in various parts of the codebase.
It also improves liveness.
This might improve attachment anomolies when performing region crossings.
2011-08-31 16:29:51 +01:00