aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-12-08 21:45:02 +0000
committerJustin Clark-Casey (justincc)2011-12-08 21:45:02 +0000
commit32d0ef89c6fbaf14e669e9dd3a8508bc817fbd52 (patch)
tree8cd3e37ea48bb5116d1441bde897e00533805b5d /OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
parentAdd OpenSim.Region.ClientStack.LindenUDP.Tests.dll back into the test suite (diff)
downloadopensim-SC_OLD-32d0ef89c6fbaf14e669e9dd3a8508bc817fbd52.zip
opensim-SC_OLD-32d0ef89c6fbaf14e669e9dd3a8508bc817fbd52.tar.gz
opensim-SC_OLD-32d0ef89c6fbaf14e669e9dd3a8508bc817fbd52.tar.bz2
opensim-SC_OLD-32d0ef89c6fbaf14e669e9dd3a8508bc817fbd52.tar.xz
Extend TestAddClient() to check that the first packet received is an ack packet
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs16
1 files changed, 13 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
index c6a5b98..1457194 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
@@ -37,7 +37,7 @@ using OpenSim.Region.Framework.Scenes;
37using OpenSim.Tests.Common; 37using OpenSim.Tests.Common;
38using OpenSim.Tests.Common.Mock; 38using OpenSim.Tests.Common.Mock;
39 39
40namespace OpenSim.Region.ClientStack.LindenUDP 40namespace OpenSim.Region.ClientStack.LindenUDP.Tests
41{ 41{
42 /// <summary> 42 /// <summary>
43 /// This will contain basic tests for the LindenUDP client stack 43 /// This will contain basic tests for the LindenUDP client stack
@@ -167,8 +167,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
167 uint port = 0; 167 uint port = 0;
168 AgentCircuitManager acm = scene.AuthenticateHandler; 168 AgentCircuitManager acm = scene.AuthenticateHandler;
169 169
170 LLUDPServer llUdpServer 170 TestLLUDPServer llUdpServer
171 = new LLUDPServer(IPAddress.Any, ref port, 0, false, new IniConfigSource(), acm); 171 = new TestLLUDPServer(IPAddress.Any, ref port, 0, false, new IniConfigSource(), acm);
172 llUdpServer.AddScene(scene); 172 llUdpServer.AddScene(scene);
173 173
174 UseCircuitCodePacket uccp = new UseCircuitCodePacket(); 174 UseCircuitCodePacket uccp = new UseCircuitCodePacket();
@@ -201,6 +201,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
201 // Should succeed now 201 // Should succeed now
202 ScenePresence sp = scene.GetScenePresence(myAgentUuid); 202 ScenePresence sp = scene.GetScenePresence(myAgentUuid);
203 Assert.That(sp.UUID, Is.EqualTo(myAgentUuid)); 203 Assert.That(sp.UUID, Is.EqualTo(myAgentUuid));
204
205 // FIXME: We're still replying to an ack when the client is not authorized, which is not correct behaviour.
206 Assert.That(llUdpServer.PacketsSent.Count, Is.EqualTo(2));
207
208 Packet packet = llUdpServer.PacketsSent[1];
209 Assert.That(packet, Is.InstanceOf(typeof(PacketAckPacket)));
210
211 PacketAckPacket ackPacket = packet as PacketAckPacket;
212 Assert.That(ackPacket.Packets.Length, Is.EqualTo(1));
213 Assert.That(ackPacket.Packets[0].ID, Is.EqualTo(0));
204 } 214 }
205 215
206// /// <summary> 216// /// <summary>