From c379c66c7c3becdc56066b5f530b06e78117cfec Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 23 Oct 2008 19:51:10 +0000 Subject: * Reenable assert for the add circuit test * This checks that a client circuit is established when the udp server is given a use client circuit code packet * And checks that other circuit codes do not exist --- OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs | 5 +++-- OpenSim/Region/ClientStack/LindenUDP/Tests/TestLLUDPServer.cs | 8 +++++++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs index e32e423..7d1d238 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs @@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests ClientStackUserSettings userSettings = new ClientStackUserSettings(); uint port = 666; - testLLUDPServer.Initialise(null, ref port, 0, false, userSettings, null, null); + testLLUDPServer.Initialise(null, ref port, 0, false, userSettings, null, new AgentCircuitManager()); LLPacketServer packetServer = new LLPacketServer(testLLUDPServer, userSettings); testLLUDPServer.LocalScene = new MockScene(); @@ -73,7 +73,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests testLLUDPServer.LoadReceive(uccp, testEp); testLLUDPServer.ReceiveData(null); - //Assert.IsTrue(testLLUDPServer.HasCircuit(123456)); + Assert.IsFalse(testLLUDPServer.HasCircuit(101)); + Assert.IsTrue(testLLUDPServer.HasCircuit(123456)); } } } diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/TestLLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/Tests/TestLLUDPServer.cs index bd5b282..252b2fc 100755 --- a/OpenSim/Region/ClientStack/LindenUDP/Tests/TestLLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/Tests/TestLLUDPServer.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; using System.Net; +using System.Net.Sockets; using OpenMetaverse.Packets; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; @@ -65,6 +66,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests return true; } + public override void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode) + { + // Don't do anything just yet + } + /// /// Load a packet to be received by the LLUDPServer on the next receive call /// @@ -81,7 +87,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests public void ReceiveData(IAsyncResult result) { OnReceivedData(result); - } + } /// /// Has a circuit with the given code been established? -- cgit v1.1