Commit Graph

28 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
Oren Hurvitz 06e0528d0b In teleports, pass the source region to the destination (similar to an HTTP referrer) 2014-04-09 09:22:20 +01:00
Justin Clark-Casey (justincc) 3ffd90496a Prevent duplicate invocations or race dontision in SP.CompleteMovement()
This can happen under poor network conditions if a viewer repeats the message send
If this happens, physics actors can get orphaned, which unecessarily raises physics frame times
2014-01-16 20:23:31 +00:00
Justin Clark-Casey (justincc) 2cd95fac73 refactor: Rename Scene.AddNewClient() to AddNewAgent() to make it obvious in the code that this is symmetric with CloseAgent() 2013-09-27 22:27:39 +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) 840be97e40 Fix failure in TestCreateDuplicateRootScenePresence().
This is a test setup failure since code paths when adding a duplicate root scene presence now require the EntityTransferModule to be present.
Test fixed by adding this module to test setup
2013-07-26 20:52:30 +01:00
Justin Clark-Casey (justincc) 8960418e7d Add regression test for presence crossing between regions on the same simulator.
Unlike a much earlier commented out version of this test, this is done in synchronous mode.
2013-03-06 21:37:53 +00: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
Justin Clark-Casey (justincc) e9a121e1b2 Add TestCreateDuplicateRootScenePresence() regression test. 2012-07-19 21:54:50 +01:00
Justin Clark-Casey (justincc) c0ab406e2e Add basic TestCreateRootScenePresence() regression test 2012-07-19 21:41:13 +01:00
Justin Clark-Casey (justincc) 30f4a33f01 Don't make duplicate call to ScenePresence.Close() separately in ETM.DoTeleport() if an agent needs closing.
This is always done as part of Scene.RemoveClient()
Also refactors try/catching in Scene.RemoveClient() to log NREs instead of silently discarding, since these are useful symptoms of problems.
2012-06-08 01:26:43 +01:00
Justin Clark-Casey (justincc) 9d2e1c67a8 Add regression test for teleporting between neighbouring regions on the same simulator
This adds a non-advertised wait_for_callback option in [EntityTransfer].  Default is always true.
Teleport tests disable the wait for callback from the destination region in order to run within a single thread.
2012-05-01 23:14:12 +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) 9b762a5a84 Only look for an uploaded transactional asset in Scene.UpdateTaskInventory if we have been passed a non-zero transaction ID.
This resolves the recent regression from deeb728 where notecards could not be saved in prim inventories.
This looks like a better solution than deeb728 since only non-caps updates pass in a transaction ID.
Hopefully resolves http://opensimulator.org/mantis/view.php?id=5873
2012-02-04 00:20:27 +00:00
Justin Clark-Casey (justincc) a82aea53f8 Split up test SceneHelpers to provide an AddChildScenePresence() call 2011-12-03 19:32:59 +00:00
Justin Clark-Casey (justincc) a4d82895be Remove T012_TestAddNeighbourRegion() and T013_TestRemoveNeighbourRegion() since they don't do anything useful. 2011-12-03 19:14:37 +00:00
Justin Clark-Casey (justincc) 3852f05e6e Extend TestCreateChildScenePresence to make assertions both at CreateAgent stage and then at Scene.AddClient() 2011-12-03 19:10:32 +00:00
Justin Clark-Casey (justincc) 4919c60560 Add beginning of ScenePresenceAgentTests.TestCreateChildScenePresence()
This required an option to be added to NullRegionData via ConnectionString for it to act as a non-static instance, so that regression tests (which only load this class once) don't get hopeless confused and complex to compensate.
Normal standalone operation unaffected.
2011-12-03 18:59:54 +00:00
Justin Clark-Casey (justincc) c934901a05 Use GetAgentCircuits() to receive a copy of the AgentCircuitsByUUID dictionary rather than AgentCircuitManager.AgentCircuits directly in "show circuits" to avoid enumeration exceptions 2011-12-03 16:11:47 +00:00
Justin Clark-Casey (justincc) aac3f2d04e Add agent circuit number checks to TestCloseAgent() 2011-12-03 16:04:11 +00:00
Dan Lake 4b46b7a5ad Fixed line endings from previous commit 2011-10-06 23:20:51 -07:00
Dan Lake 4748c19bdb Refactored "known child region" in ScenePresence. There were 4 different
ways to access the list/dictionary of child regions and locking was
inconsistent. There are now public properties which enforce locks.
Callers are no longer required to create new copies of lists.
2011-10-06 22:47:33 -07:00
Justin Clark-Casey (justincc) 899d109e82 get rid of appearance null checks - this is never null 2011-08-31 17:13:53 +01:00
Justin Clark-Casey (justincc) c1a34cd8da Don't try to save changed attachment states when an NPC with attachments is removed from the scene.
This is done by introducing a PresenceType enum into ScenePresence which currently has two values, User and Npc.
This seems better than a SaveAttachments flag in terms of code comprehension, though I'm still slightly uneasy about introducing these semantics to core objects
2011-08-18 00:53:05 +01:00
Justin Clark-Casey (justincc) eec54adac5 remove some obsolete tests that are now done elsewhere 2011-08-06 02:38:38 +01:00
Justin Clark-Casey (justincc) e37f8cf902 Add a test to check that ScenePresence and circuit go away when a root agent is closed down 2011-08-06 02:27:25 +01:00
Justin Clark-Casey (justincc) 85e07c78fb refactor: Change SceneHelpers.AddClient() to AddScenePresence().
This seems to make more sense as we can get SP.ControllingClient
2011-08-06 02:17:41 +01:00
Justin Clark-Casey (justincc) 83ba35a26b rip out sog generation methods in ScenePresenceAgentTests and use SceneHelpers instead
Not that it matters, since these tests are pretty bogus anyway.
Also, renames some test classes for consistency.
2011-08-06 02:01:25 +01:00