From 82e2e1e00c13f0dec8dc5d6f19d9a0595a02faac Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sun, 13 Aug 2017 06:04:39 +0100
Subject: change locking on sop updates
---
.../Region/Framework/Scenes/SceneObjectGroup.cs | 6 +-
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 349 +++++++++++----------
2 files changed, 186 insertions(+), 169 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 6f46a92..f0364db 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -657,6 +657,9 @@ namespace OpenSim.Region.Framework.Scenes
}
}
+ if(!m_scene.IsRunning)
+ return sog;
+
if (root.KeyframeMotion != null)
root.KeyframeMotion.StartCrossingCheck();
@@ -3018,12 +3021,13 @@ namespace OpenSim.Region.Framework.Scenes
// If we somehow got here to updating the SOG and its root part is not scheduled for update,
// check to see if the physical position or rotation warrant an update.
+/*
if (m_rootPart.UpdateFlag == UpdateRequired.NONE)
{
// rootpart SendScheduledUpdates will check if a update is needed
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
}
-
+*/
if (IsAttachment)
{
ScenePresence sp = m_scene.GetScenePresence(AttachedAvatar);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 0bf3c1d..0370c41 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -238,12 +238,6 @@ namespace OpenSim.Region.Framework.Scenes
///
public bool SoundQueueing { get; set; }
- public uint TimeStampFull;
-
- public uint TimeStampLastActivity; // Will be used for AutoReturn
-
- public uint TimeStampTerse;
-
[XmlIgnore]
public Quaternion AttachRotation = Quaternion.Identity;
@@ -1219,6 +1213,7 @@ namespace OpenSim.Region.Framework.Scenes
}
public UpdateRequired UpdateFlag { get; set; }
+ private object UpdateFlagLock = new object();
///
/// Used for media on a prim.
@@ -1641,8 +1636,10 @@ namespace OpenSim.Region.Framework.Scenes
PhysActor.SetMaterial((int)value);
}
if(ParentGroup != null)
+ {
ParentGroup.HasGroupChanged = true;
- ScheduleFullUpdateIfNone();
+ ScheduleFullUpdate();
+ }
}
}
}
@@ -1730,7 +1727,12 @@ namespace OpenSim.Region.Framework.Scenes
public byte PhysicsShapeType
{
- get { return m_physicsShapeType; }
+ get
+ {
+// if (PhysActor != null)
+// m_physicsShapeType = PhysActor.PhysicsShapeType;
+ return m_physicsShapeType;
+ }
set
{
byte oldv = m_physicsShapeType;
@@ -1781,10 +1783,12 @@ namespace OpenSim.Region.Framework.Scenes
{
m_density = value;
- ScheduleFullUpdateIfNone();
if (ParentGroup != null)
+ {
ParentGroup.HasGroupChanged = true;
+ ScheduleFullUpdate();
+ }
PhysicsActor pa = PhysActor;
if (pa != null)
@@ -1802,10 +1806,11 @@ namespace OpenSim.Region.Framework.Scenes
{
m_gravitymod = value;
- ScheduleFullUpdateIfNone();
-
if (ParentGroup != null)
+ {
ParentGroup.HasGroupChanged = true;
+ ScheduleFullUpdate();
+ }
PhysicsActor pa = PhysActor;
if (pa != null)
@@ -1823,10 +1828,11 @@ namespace OpenSim.Region.Framework.Scenes
{
m_friction = value;
- ScheduleFullUpdateIfNone();
-
if (ParentGroup != null)
+ {
ParentGroup.HasGroupChanged = true;
+ ScheduleFullUpdate();
+ }
PhysicsActor pa = PhysActor;
if (pa != null)
@@ -1844,10 +1850,11 @@ namespace OpenSim.Region.Framework.Scenes
{
m_bounce = value;
- ScheduleFullUpdateIfNone();
-
if (ParentGroup != null)
+ {
ParentGroup.HasGroupChanged = true;
+ ScheduleFullUpdate();
+ }
PhysicsActor pa = PhysActor;
if (pa != null)
@@ -1876,7 +1883,8 @@ namespace OpenSim.Region.Framework.Scenes
///
public void ClearUpdateSchedule()
{
- UpdateFlag = UpdateRequired.NONE;
+ lock(UpdateFlagLock)
+ UpdateFlag = UpdateRequired.NONE;
}
///
@@ -3239,17 +3247,6 @@ namespace OpenSim.Region.Framework.Scenes
APIDActive = false;
}
- public void ScheduleFullUpdateIfNone()
- {
- if (ParentGroup == null)
- return;
-
-// ??? ParentGroup.HasGroupChanged = true;
-
- if (UpdateFlag != UpdateRequired.FULL)
- ScheduleFullUpdate();
- }
-
///
/// Schedules this prim for a full update
///
@@ -3260,30 +3257,21 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup == null)
return;
- ParentGroup.QueueForUpdateCheck();
-
- int timeNow = Util.UnixTimeSinceEpoch();
-
- // If multiple updates are scheduled on the same second, we still need to perform all of them
- // So we'll force the issue by bumping up the timestamp so that later processing sees these need
- // to be performed.
- if (timeNow <= TimeStampFull)
+ lock(UpdateFlagLock)
{
- TimeStampFull += 1;
- }
- else
- {
- TimeStampFull = (uint)timeNow;
- }
-
- UpdateFlag = UpdateRequired.FULL;
+ ParentGroup.QueueForUpdateCheck(); // just in case
+ if(UpdateFlag != UpdateRequired.FULL)
+ {
+ UpdateFlag = UpdateRequired.FULL;
- // m_log.DebugFormat(
- // "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}",
- // UUID, Name, TimeStampFull);
+ // m_log.DebugFormat(
+ // "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}",
+ // UUID, Name, TimeStampFull);
- if (ParentGroup.Scene != null)
- ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this, true);
+ if (ParentGroup.Scene != null)
+ ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this, true);
+ }
+ }
}
///
@@ -3304,21 +3292,23 @@ namespace OpenSim.Region.Framework.Scenes
return;
}
- if (UpdateFlag == UpdateRequired.NONE)
+ lock(UpdateFlagLock)
{
- ParentGroup.HasGroupChanged = true;
- ParentGroup.QueueForUpdateCheck();
+ if (UpdateFlag == UpdateRequired.NONE)
+ {
+ ParentGroup.HasGroupChanged = true;
+ ParentGroup.QueueForUpdateCheck();
- TimeStampTerse = (uint) Util.UnixTimeSinceEpoch();
- UpdateFlag = UpdateRequired.TERSE;
+ UpdateFlag = UpdateRequired.TERSE;
- // m_log.DebugFormat(
- // "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}",
- // UUID, Name, TimeStampTerse);
- }
+ // m_log.DebugFormat(
+ // "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}",
+ // UUID, Name, TimeStampTerse);
+ }
- if (ParentGroup.Scene != null)
- ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this, false);
+ if (ParentGroup.Scene != null)
+ ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this, false);
+ }
}
public void ScriptSetPhysicsStatus(bool UsePhysics)
@@ -3362,12 +3352,15 @@ namespace OpenSim.Region.Framework.Scenes
return;
// Update the "last" values
- m_lastPosition = AbsolutePosition;
- m_lastRotation = RotationOffset;
- m_lastVelocity = Velocity;
- m_lastAcceleration = Acceleration;
- m_lastAngularVelocity = AngularVelocity;
- m_lastUpdateSentTime = Util.GetTimeStampMS();
+ lock(UpdateFlagLock)
+ {
+ m_lastPosition = AbsolutePosition;
+ m_lastRotation = RotationOffset;
+ m_lastVelocity = Velocity;
+ m_lastAcceleration = Acceleration;
+ m_lastAngularVelocity = AngularVelocity;
+ m_lastUpdateSentTime = Util.GetTimeStampMS();
+ }
ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
{
@@ -3381,12 +3374,15 @@ namespace OpenSim.Region.Framework.Scenes
return;
// Update the "last" values
- m_lastPosition = AbsolutePosition;
- m_lastRotation = RotationOffset;
- m_lastVelocity = Velocity;
- m_lastAcceleration = Acceleration;
- m_lastAngularVelocity = AngularVelocity;
- m_lastUpdateSentTime = Util.GetTimeStampMS();
+ lock(UpdateFlagLock)
+ {
+ m_lastPosition = AbsolutePosition;
+ m_lastRotation = RotationOffset;
+ m_lastVelocity = Velocity;
+ m_lastAcceleration = Acceleration;
+ m_lastAngularVelocity = AngularVelocity;
+ m_lastUpdateSentTime = Util.GetTimeStampMS();
+ }
if (ParentGroup.IsAttachment)
{
@@ -3442,108 +3438,118 @@ namespace OpenSim.Region.Framework.Scenes
/// Tell all the prims which have had updates scheduled
///
public void SendScheduledUpdates()
- {
- switch (UpdateFlag)
+ {
+ UpdateRequired currentUpdate;
+ lock(UpdateFlagLock)
+ {
+ currentUpdate = UpdateFlag;
+ ClearUpdateSchedule();
+ }
+
+ switch (currentUpdate)
{
case UpdateRequired.NONE:
- ClearUpdateSchedule();
break;
case UpdateRequired.TERSE:
-
- ClearUpdateSchedule();
bool needupdate = true;
- double now = Util.GetTimeStampMS();
- Vector3 curvel = Velocity;
- Vector3 curacc = Acceleration;
- Vector3 angvel = AngularVelocity;
-
- while(true) // just to avoid ugly goto
+ lock(UpdateFlagLock)
{
- double elapsed = now - m_lastUpdateSentTime;
- if (elapsed > TIME_MS_TOLERANCE)
- break;
+ double now = Util.GetTimeStampMS();
+ Vector3 curvel = Velocity;
+ Vector3 curacc = Acceleration;
+ Vector3 angvel = AngularVelocity;
- if( Math.Abs(curacc.X - m_lastAcceleration.X) > VELOCITY_TOLERANCE ||
- Math.Abs(curacc.Y - m_lastAcceleration.Y) > VELOCITY_TOLERANCE ||
- Math.Abs(curacc.Z - m_lastAcceleration.Z) > VELOCITY_TOLERANCE)
- break;
+ while(true) // just to avoid ugly goto
+ {
+ double elapsed = now - m_lastUpdateSentTime;
+ if (elapsed > TIME_MS_TOLERANCE)
+ break;
- // velocity change is also direction not only norm)
- if( Math.Abs(curvel.X - m_lastVelocity.X) > VELOCITY_TOLERANCE ||
- Math.Abs(curvel.Y - m_lastVelocity.Y) > VELOCITY_TOLERANCE ||
- Math.Abs(curvel.Z - m_lastVelocity.Z) > VELOCITY_TOLERANCE)
- break;
-
- float vx = Math.Abs(curvel.X);
- if(vx > 128.0)
- break;
- float vy = Math.Abs(curvel.Y);
- if(vy > 128.0)
- break;
- float vz = Math.Abs(curvel.Z);
- if(vz > 128.0)
- break;
+ if( Math.Abs(curacc.X - m_lastAcceleration.X) > VELOCITY_TOLERANCE ||
+ Math.Abs(curacc.Y - m_lastAcceleration.Y) > VELOCITY_TOLERANCE ||
+ Math.Abs(curacc.Z - m_lastAcceleration.Z) > VELOCITY_TOLERANCE)
+ break;
- if (
- vx < VELOCITY_TOLERANCE &&
- vy < VELOCITY_TOLERANCE &&
- vz < VELOCITY_TOLERANCE
- )
- {
- if(!AbsolutePosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))
+ // velocity change is also direction not only norm)
+ if( Math.Abs(curvel.X - m_lastVelocity.X) > VELOCITY_TOLERANCE ||
+ Math.Abs(curvel.Y - m_lastVelocity.Y) > VELOCITY_TOLERANCE ||
+ Math.Abs(curvel.Z - m_lastVelocity.Z) > VELOCITY_TOLERANCE)
break;
+
+ float vx = Math.Abs(curvel.X);
+ if(vx > 128.0)
+ break;
+ float vy = Math.Abs(curvel.Y);
+ if(vy > 128.0)
+ break;
+ float vz = Math.Abs(curvel.Z);
+ if(vz > 128.0)
+ break;
+
+ if (
+ vx < VELOCITY_TOLERANCE &&
+ vy < VELOCITY_TOLERANCE &&
+ vz < VELOCITY_TOLERANCE
+ )
+ {
+ if(!AbsolutePosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))
+ break;
- if (vx < 1e-4 &&
- vy < 1e-4 &&
- vz < 1e-4 &&
- (
- Math.Abs(m_lastVelocity.X) > 1e-4 ||
- Math.Abs(m_lastVelocity.Y) > 1e-4 ||
- Math.Abs(m_lastVelocity.Z) > 1e-4
- ))
+ if (vx < 1e-4 &&
+ vy < 1e-4 &&
+ vz < 1e-4 &&
+ (
+ Math.Abs(m_lastVelocity.X) > 1e-4 ||
+ Math.Abs(m_lastVelocity.Y) > 1e-4 ||
+ Math.Abs(m_lastVelocity.Z) > 1e-4
+ ))
+ break;
+ }
+
+ if( Math.Abs(angvel.X - m_lastAngularVelocity.X) > VELOCITY_TOLERANCE ||
+ Math.Abs(angvel.Y - m_lastAngularVelocity.Y) > VELOCITY_TOLERANCE ||
+ Math.Abs(angvel.Z - m_lastAngularVelocity.Z) > VELOCITY_TOLERANCE)
break;
- }
- if( Math.Abs(angvel.X - m_lastAngularVelocity.X) > VELOCITY_TOLERANCE ||
- Math.Abs(angvel.Y - m_lastAngularVelocity.Y) > VELOCITY_TOLERANCE ||
- Math.Abs(angvel.Z - m_lastAngularVelocity.Z) > VELOCITY_TOLERANCE)
- break;
+ // viewer interpolators have a limit of 128m/s
+ float ax = Math.Abs(angvel.X);
+ if(ax > 64.0)
+ break;
+ float ay = Math.Abs(angvel.Y);
+ if(ay > 64.0)
+ break;
+ float az = Math.Abs(angvel.Z);
+ if(az > 64.0)
+ break;
- // viewer interpolators have a limit of 128m/s
- float ax = Math.Abs(angvel.X);
- if(ax > 64.0)
- break;
- float ay = Math.Abs(angvel.Y);
- if(ay > 64.0)
- break;
- float az = Math.Abs(angvel.Z);
- if(az > 64.0)
+ if (
+ ax < VELOCITY_TOLERANCE &&
+ ay < VELOCITY_TOLERANCE &&
+ az < VELOCITY_TOLERANCE &&
+ !RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE)
+ )
+ break;
+
+ needupdate = false;
break;
+ }
- if (
- ax < VELOCITY_TOLERANCE &&
- ay < VELOCITY_TOLERANCE &&
- az < VELOCITY_TOLERANCE &&
- !RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE)
- )
- break;
+ if(needupdate)
+ {
- needupdate = false;
- break;
+ // Update the "last" values
+ m_lastPosition = AbsolutePosition;
+ m_lastRotation = RotationOffset;
+ m_lastVelocity = curvel;
+ m_lastAcceleration = curacc;
+ m_lastAngularVelocity = angvel;
+ m_lastUpdateSentTime = now;
+ }
}
if(needupdate)
{
-
- // Update the "last" values
- m_lastPosition = AbsolutePosition;
- m_lastRotation = RotationOffset;
- m_lastVelocity = curvel;
- m_lastAcceleration = curacc;
- m_lastAngularVelocity = angvel;
- m_lastUpdateSentTime = now;
-
ParentGroup.Scene.ForEachClient(delegate(IClientAPI client)
{
SendTerseUpdateToClient(client);
@@ -3552,7 +3558,6 @@ namespace OpenSim.Region.Framework.Scenes
break;
case UpdateRequired.FULL:
- ClearUpdateSchedule();
SendFullUpdateToAllClientsInternal();
break;
}
@@ -3567,15 +3572,19 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup == null || ParentGroup.Scene == null)
return;
- ClearUpdateSchedule();
+ lock(UpdateFlagLock)
+ {
+ if(UpdateFlag != UpdateRequired.NONE)
+ return;
- // Update the "last" values
- m_lastPosition = AbsolutePosition;
- m_lastRotation = RotationOffset;
- m_lastVelocity = Velocity;
- m_lastAcceleration = Acceleration;
- m_lastAngularVelocity = AngularVelocity;
- m_lastUpdateSentTime = Util.GetTimeStampMS();
+ // Update the "last" values
+ m_lastPosition = AbsolutePosition;
+ m_lastRotation = RotationOffset;
+ m_lastVelocity = Velocity;
+ m_lastAcceleration = Acceleration;
+ m_lastAngularVelocity = AngularVelocity;
+ m_lastUpdateSentTime = Util.GetTimeStampMS();
+ }
ParentGroup.Scene.ForEachClient(delegate(IClientAPI client)
{
@@ -3588,15 +3597,19 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup == null || ParentGroup.Scene == null)
return;
- ClearUpdateSchedule();
+ lock(UpdateFlagLock)
+ {
+ if(UpdateFlag != UpdateRequired.NONE)
+ return;
- // Update the "last" values
- m_lastPosition = AbsolutePosition;
- m_lastRotation = RotationOffset;
- m_lastVelocity = Velocity;
- m_lastAcceleration = Acceleration;
- m_lastAngularVelocity = AngularVelocity;
- m_lastUpdateSentTime = Util.GetTimeStampMS();
+ // Update the "last" values
+ m_lastPosition = AbsolutePosition;
+ m_lastRotation = RotationOffset;
+ m_lastVelocity = Velocity;
+ m_lastAcceleration = Acceleration;
+ m_lastAngularVelocity = AngularVelocity;
+ m_lastUpdateSentTime = Util.GetTimeStampMS();
+ }
if (ParentGroup.IsAttachment)
{
--
cgit v1.1
From 1dbf3215b067d1f001fc2920db79342ec811c157 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sun, 13 Aug 2017 06:34:52 +0100
Subject: jenkins tests still don't set scene.IsRunning
---
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index f0364db..53b7ced 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -657,8 +657,8 @@ namespace OpenSim.Region.Framework.Scenes
}
}
- if(!m_scene.IsRunning)
- return sog;
+// if(!m_scene.IsRunning)
+// return sog;
if (root.KeyframeMotion != null)
root.KeyframeMotion.StartCrossingCheck();
--
cgit v1.1
From 3052c7080a5978b78774be1b846d7a881fe3e5f0 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 14 Aug 2017 14:48:38 -0700
Subject: Added comment just to trigger jenkins
---
OpenSim/Tests/Permissions/IndirectTransferTests.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim')
diff --git a/OpenSim/Tests/Permissions/IndirectTransferTests.cs b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
index 7d8027f..d5a36cc 100644
--- a/OpenSim/Tests/Permissions/IndirectTransferTests.cs
+++ b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
@@ -74,6 +74,7 @@ namespace OpenSim.Tests.Permissions
// Try A2 takes copies of objects that cannot be copied.
for (int i = 0; i < 6; i++)
TakeOneBox(Common.TheScene.GetSceneObjectGroups(), names[i], perms[i]);
+ // Ad-hoc. Enough time to let the take work.
Thread.Sleep(5000);
List items = Common.TheScene.InventoryService.GetFolderItems(Common.TheAvatars[1].UUID, objsFolder.ID);
--
cgit v1.1
From af5573728a1c139607fe189d5a532db1e16d0f8b Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 14 Aug 2017 15:01:19 -0700
Subject: Another comment for testing jenkins
---
OpenSim/Tests/Permissions/IndirectTransferTests.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim')
diff --git a/OpenSim/Tests/Permissions/IndirectTransferTests.cs b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
index d5a36cc..b2c6e76 100644
--- a/OpenSim/Tests/Permissions/IndirectTransferTests.cs
+++ b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
@@ -87,6 +87,7 @@ namespace OpenSim.Tests.Permissions
// Try A2 takes copies of objects that can be copied.
for (int i = 0; i < 6; i++)
TakeOneBox(Common.TheScene.GetSceneObjectGroups(), names[i], perms[i]);
+ // Ad-hoc. Enough time to let the take work.
Thread.Sleep(5000);
items = Common.TheScene.InventoryService.GetFolderItems(Common.TheAvatars[1].UUID, objsFolder.ID);
--
cgit v1.1
From 26a4c5ff85562cde2fd84286d3d486f868c8ce55 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 14 Aug 2017 16:15:08 -0700
Subject: Comment to trigger jenkins
---
OpenSim/Tests/Permissions/IndirectTransferTests.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim')
diff --git a/OpenSim/Tests/Permissions/IndirectTransferTests.cs b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
index b2c6e76..66a228a 100644
--- a/OpenSim/Tests/Permissions/IndirectTransferTests.cs
+++ b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
@@ -103,6 +103,7 @@ namespace OpenSim.Tests.Permissions
private void TakeOneBox(List objs, string name, PermissionMask mask)
{
+ // Find the object inworld
SceneObjectGroup box = objs.Find(sog => sog.Name == name && sog.OwnerID == Common.TheAvatars[0].UUID);
Assert.That(box, Is.Not.Null, name);
--
cgit v1.1
From 40f4b30361d10db4ac35bcec5e172e8f6ae012c4 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 14 Aug 2017 16:33:21 -0700
Subject: Strengthen the tests for the possibility that SetUpFixture does not
run in the beginning.
---
OpenSim/Tests/Permissions/DirectTransferTests.cs | 7 +++++++
OpenSim/Tests/Permissions/IndirectTransferTests.cs | 6 ++++++
2 files changed, 13 insertions(+)
(limited to 'OpenSim')
diff --git a/OpenSim/Tests/Permissions/DirectTransferTests.cs b/OpenSim/Tests/Permissions/DirectTransferTests.cs
index c68bbdf..c3dfa6c 100644
--- a/OpenSim/Tests/Permissions/DirectTransferTests.cs
+++ b/OpenSim/Tests/Permissions/DirectTransferTests.cs
@@ -44,6 +44,13 @@ namespace OpenSim.Tests.Permissions
[SetUp]
public void SetUp()
{
+ // In case we're dealing with some older version of nunit
+ if (Common.TheInstance == null)
+ {
+ Common c = new Common();
+ c.SetUp();
+ }
+
Common.TheInstance.DeleteObjectsFolders();
}
diff --git a/OpenSim/Tests/Permissions/IndirectTransferTests.cs b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
index 66a228a..e33332a 100644
--- a/OpenSim/Tests/Permissions/IndirectTransferTests.cs
+++ b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
@@ -46,6 +46,12 @@ namespace OpenSim.Tests.Permissions
[SetUp]
public void SetUp()
{
+ // In case we're dealing with some older version of nunit
+ if (Common.TheInstance == null)
+ {
+ Common c = new Common();
+ c.SetUp();
+ }
Common.TheInstance.DeleteObjectsFolders();
}
--
cgit v1.1
From 6a0b7a607f13fcee447c9d10224d5ea77db4f355 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 14 Aug 2017 16:40:36 -0700
Subject: This is the correct work around. Jenkins is confuzzled.
---
OpenSim/Tests/Permissions/DirectTransferTests.cs | 4 ++--
OpenSim/Tests/Permissions/IndirectTransferTests.cs | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Tests/Permissions/DirectTransferTests.cs b/OpenSim/Tests/Permissions/DirectTransferTests.cs
index c3dfa6c..0f251db 100644
--- a/OpenSim/Tests/Permissions/DirectTransferTests.cs
+++ b/OpenSim/Tests/Permissions/DirectTransferTests.cs
@@ -47,8 +47,8 @@ namespace OpenSim.Tests.Permissions
// In case we're dealing with some older version of nunit
if (Common.TheInstance == null)
{
- Common c = new Common();
- c.SetUp();
+ Common.TheInstance = new Common();
+ Common.TheInstance.SetUp();
}
Common.TheInstance.DeleteObjectsFolders();
diff --git a/OpenSim/Tests/Permissions/IndirectTransferTests.cs b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
index e33332a..fb96b8b 100644
--- a/OpenSim/Tests/Permissions/IndirectTransferTests.cs
+++ b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
@@ -49,8 +49,8 @@ namespace OpenSim.Tests.Permissions
// In case we're dealing with some older version of nunit
if (Common.TheInstance == null)
{
- Common c = new Common();
- c.SetUp();
+ Common.TheInstance = new Common();
+ Common.TheInstance.SetUp();
}
Common.TheInstance.DeleteObjectsFolders();
}
--
cgit v1.1
From 8b6557e377f7bac1bdb38f3e6dd22c797417d09c Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 14 Aug 2017 16:49:11 -0700
Subject: Let's try giving Common a default constructor instead of the
workaround
---
OpenSim/Tests/Permissions/Common.cs | 4 ++++
OpenSim/Tests/Permissions/DirectTransferTests.cs | 7 -------
OpenSim/Tests/Permissions/IndirectTransferTests.cs | 6 ------
3 files changed, 4 insertions(+), 13 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Tests/Permissions/Common.cs b/OpenSim/Tests/Permissions/Common.cs
index 4ecce38..cf4d2bd 100644
--- a/OpenSim/Tests/Permissions/Common.cs
+++ b/OpenSim/Tests/Permissions/Common.cs
@@ -60,6 +60,10 @@ namespace OpenSim.Tests.Permissions
private TestScene m_Scene;
private ScenePresence[] m_Avatars = new ScenePresence[3];
+ public Common()
+ {
+ }
+
[SetUp]
public override void SetUp()
{
diff --git a/OpenSim/Tests/Permissions/DirectTransferTests.cs b/OpenSim/Tests/Permissions/DirectTransferTests.cs
index 0f251db..c68bbdf 100644
--- a/OpenSim/Tests/Permissions/DirectTransferTests.cs
+++ b/OpenSim/Tests/Permissions/DirectTransferTests.cs
@@ -44,13 +44,6 @@ namespace OpenSim.Tests.Permissions
[SetUp]
public void SetUp()
{
- // In case we're dealing with some older version of nunit
- if (Common.TheInstance == null)
- {
- Common.TheInstance = new Common();
- Common.TheInstance.SetUp();
- }
-
Common.TheInstance.DeleteObjectsFolders();
}
diff --git a/OpenSim/Tests/Permissions/IndirectTransferTests.cs b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
index fb96b8b..66a228a 100644
--- a/OpenSim/Tests/Permissions/IndirectTransferTests.cs
+++ b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
@@ -46,12 +46,6 @@ namespace OpenSim.Tests.Permissions
[SetUp]
public void SetUp()
{
- // In case we're dealing with some older version of nunit
- if (Common.TheInstance == null)
- {
- Common.TheInstance = new Common();
- Common.TheInstance.SetUp();
- }
Common.TheInstance.DeleteObjectsFolders();
}
--
cgit v1.1
From eb837defdf7d9f260603fe400b3a482258605f43 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 14 Aug 2017 16:55:50 -0700
Subject: Revert "Let's try giving Common a default constructor instead of the
workaround"
This reverts commit 8b6557e377f7bac1bdb38f3e6dd22c797417d09c.
---
OpenSim/Tests/Permissions/Common.cs | 4 ----
OpenSim/Tests/Permissions/DirectTransferTests.cs | 7 +++++++
OpenSim/Tests/Permissions/IndirectTransferTests.cs | 6 ++++++
3 files changed, 13 insertions(+), 4 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Tests/Permissions/Common.cs b/OpenSim/Tests/Permissions/Common.cs
index cf4d2bd..4ecce38 100644
--- a/OpenSim/Tests/Permissions/Common.cs
+++ b/OpenSim/Tests/Permissions/Common.cs
@@ -60,10 +60,6 @@ namespace OpenSim.Tests.Permissions
private TestScene m_Scene;
private ScenePresence[] m_Avatars = new ScenePresence[3];
- public Common()
- {
- }
-
[SetUp]
public override void SetUp()
{
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
[SetUp]
public void SetUp()
{
+ // In case we're dealing with some older version of nunit
+ if (Common.TheInstance == null)
+ {
+ Common.TheInstance = new Common();
+ Common.TheInstance.SetUp();
+ }
+
Common.TheInstance.DeleteObjectsFolders();
}
diff --git a/OpenSim/Tests/Permissions/IndirectTransferTests.cs b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
index 66a228a..fb96b8b 100644
--- a/OpenSim/Tests/Permissions/IndirectTransferTests.cs
+++ b/OpenSim/Tests/Permissions/IndirectTransferTests.cs
@@ -46,6 +46,12 @@ namespace OpenSim.Tests.Permissions
[SetUp]
public void SetUp()
{
+ // In case we're dealing with some older version of nunit
+ if (Common.TheInstance == null)
+ {
+ Common.TheInstance = new Common();
+ Common.TheInstance.SetUp();
+ }
Common.TheInstance.DeleteObjectsFolders();
}
--
cgit v1.1