aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs
index c90aecf..819e4e8 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using System.Net; 28using System.Net;
29//using System.Threading;
29using log4net; 30using log4net;
30using NUnit.Framework; 31using NUnit.Framework;
31using OpenMetaverse; 32using OpenMetaverse;
@@ -69,8 +70,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
69 AgentCircuitManager acm = new AgentCircuitManager(); 70 AgentCircuitManager acm = new AgentCircuitManager();
70 AgentCircuitData acd = new AgentCircuitData(); 71 AgentCircuitData acd = new AgentCircuitData();
71 acd.AgentID = myAgentUuid; 72 acd.AgentID = myAgentUuid;
72 acd.SessionID = mySessionUuid; 73 acd.SessionID = mySessionUuid;
73 acm.AddNewCircuit(myCircuitCode, acd);
74 74
75 uint port = 666; 75 uint port = 666;
76 testLLUDPServer.Initialise(null, ref port, 0, false, userSettings, null, acm); 76 testLLUDPServer.Initialise(null, ref port, 0, false, userSettings, null, acm);
@@ -89,10 +89,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
89 EndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999); 89 EndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999);
90 90
91 testLLUDPServer.LoadReceive(uccp, testEp); 91 testLLUDPServer.LoadReceive(uccp, testEp);
92 testLLUDPServer.ReceiveData(null); 92 testLLUDPServer.ReceiveData(null);
93 93
94 Assert.IsFalse(testLLUDPServer.HasCircuit(101)); 94 // Circuit shouildn't exist since the circuit manager doesn't know about this circuit for authentication yet
95 Assert.IsFalse(testLLUDPServer.HasCircuit(myCircuitCode));
96
97 acm.AddNewCircuit(myCircuitCode, acd);
98
99 testLLUDPServer.LoadReceive(uccp, testEp);
100 testLLUDPServer.ReceiveData(null);
101
102 // Should succeed now
95 Assert.IsTrue(testLLUDPServer.HasCircuit(myCircuitCode)); 103 Assert.IsTrue(testLLUDPServer.HasCircuit(myCircuitCode));
104 Assert.IsFalse(testLLUDPServer.HasCircuit(101));
96 } 105 }
97 } 106 }
98} 107}