mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
Fix LocalPresenceServiceConnector test now that the hardcoded test data has been removed from Data.Null.NullPresenceData
Unfortunately, this meant publicly exposing the underlying service for the connector. The other solution would be to create alternative initializers for services and connectors where objects could be given directly rather than loaded indirectly through config. Unfortunately, this would require a lot of work in this case but might be the better way forward.
This commit is contained in:
@@ -47,7 +47,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
|
||||
private bool m_Enabled = false;
|
||||
|
||||
private PresenceDetector m_PresenceDetector;
|
||||
private IPresenceService m_PresenceService;
|
||||
|
||||
/// <summary>
|
||||
/// Underlying presence service. Do not use directly.
|
||||
/// </summary>
|
||||
public IPresenceService m_PresenceService;
|
||||
|
||||
public LocalPresenceServicesConnector()
|
||||
{
|
||||
|
||||
@@ -59,6 +59,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests
|
||||
config.Configs["PresenceService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
|
||||
|
||||
m_LocalConnector = new LocalPresenceServicesConnector(config);
|
||||
|
||||
// Let's stick in a test presence
|
||||
m_LocalConnector.m_PresenceService.LoginAgent(UUID.Zero.ToString(), UUID.Zero, UUID.Zero);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -68,6 +71,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests
|
||||
public void TestPresenceV0_1()
|
||||
{
|
||||
SetUp();
|
||||
|
||||
// Let's stick in a test presence
|
||||
/*
|
||||
PresenceData p = new PresenceData();
|
||||
p.SessionID = UUID.Zero;
|
||||
p.UserID = UUID.Zero.ToString();
|
||||
p.Data = new Dictionary<string, string>();
|
||||
p.Data["Online"] = true.ToString();
|
||||
m_presenceData.Add(UUID.Zero, p);
|
||||
*/
|
||||
|
||||
string user1 = UUID.Zero.ToString();
|
||||
UUID session1 = UUID.Zero;
|
||||
|
||||
Reference in New Issue
Block a user