Revision: 3c7e7345b46b
Author:   Alexandre Mendonça <ammendonca>
Date:     Thu Jul 31 01:03:26 2014 UTC
Log:      ISSUE 46: Add support for multiple local interfaces (Tests)
Update Issue 46
Status: Fixed
Tests committed. Issue resolved.

http://code.google.com/p/jdiameter/source/detail?r=3c7e7345b46b

Added:
/testsuite/tests/src/test/java/org/mobicents/diameter/stack/StackConnectMultiBaseTest.java /testsuite/tests/src/test/java/org/mobicents/diameter/stack/StackConnectMultiSCTPTest.java /testsuite/tests/src/test/java/org/mobicents/diameter/stack/StackConnectMultiTCPTest.java /testsuite/tests/src/test/resources/configurations/multi-sctp-jdiameter-client-one.xml /testsuite/tests/src/test/resources/configurations/multi-sctp-jdiameter-client-two.xml /testsuite/tests/src/test/resources/configurations/multi-sctp-jdiameter-server-two.xml /testsuite/tests/src/test/resources/configurations/multi-tcp-jdiameter-client-one.xml /testsuite/tests/src/test/resources/configurations/multi-tcp-jdiameter-client-two.xml /testsuite/tests/src/test/resources/configurations/multi-tcp-jdiameter-server-two.xml

=======================================
--- /dev/null
+++ /testsuite/tests/src/test/java/org/mobicents/diameter/stack/StackConnectMultiBaseTest.java Thu Jul 31 01:03:26 2014 UTC
@@ -0,0 +1,168 @@
+/*
+ * TeleStax, Open Source Cloud Communications
+ * Copyright 2011-2014, Telestax Inc. and individual contributors
+ * by the @authors tag.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>
+ */
+
+package org.mobicents.diameter.stack;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.InputStream;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.jdiameter.api.Answer;
+import org.jdiameter.api.ApplicationId;
+import org.jdiameter.api.Configuration;
+import org.jdiameter.api.DisconnectCause;
+import org.jdiameter.api.Mode;
+import org.jdiameter.api.Network;
+import org.jdiameter.api.NetworkReqListener;
+import org.jdiameter.api.Peer;
+import org.jdiameter.api.PeerState;
+import org.jdiameter.api.PeerTable;
+import org.jdiameter.api.Request;
+import org.jdiameter.client.api.controller.IPeer;
+import org.jdiameter.server.impl.StackImpl;
+
+/**
+ *
+ * @author <a href="mailto:[email protected]";> Alexandre Mendonca </a>
+ * @author <a href="mailto:[email protected]";> Bartosz Baranowski </a>
+ */
+public abstract class StackConnectMultiBaseTest {
+
+ private static Logger logger = Logger.getLogger(StackConnectMultiBaseTest.class);
+
+  public abstract String getServerConfigName();
+  public abstract String getClient1ConfigName();
+  public abstract String getClient2ConfigName();
+
+  // 1. start server
+  // 2. start client1 + wait for connection
+  // 3. start client2 + wait for connection
+  public void testConnectUndefined() throws Exception {
+    Logger.getLogger("org.jdiameter").setLevel(Level.DEBUG);
+    StackImpl server = new StackImpl();
+    StackImpl client1 = new StackImpl();
+    StackImpl client2 = new StackImpl();
+    try {
+      String serverConfigName = getServerConfigName();
+      String clientConfigName1 = getClient1ConfigName();
+      String clientConfigName2 = getClient2ConfigName();
+
+ InputStream serverConfigInputStream = StackConnectMultiBaseTest.class.getClassLoader().getResourceAsStream(
+          "configurations/" + serverConfigName);
+ InputStream clientConfigInputStream1 = StackConnectMultiBaseTest.class.getClassLoader().getResourceAsStream(
+          "configurations/" + clientConfigName1);
+ InputStream clientConfigInputStream2 = StackConnectMultiBaseTest.class.getClassLoader().getResourceAsStream(
+          "configurations/" + clientConfigName2);
+
+ Configuration serverConfig = new org.jdiameter.server.impl.helpers.XMLConfiguration(serverConfigInputStream); + Configuration clientConfig1 = new org.jdiameter.server.impl.helpers.XMLConfiguration(clientConfigInputStream1); + Configuration clientConfig2 = new org.jdiameter.server.impl.helpers.XMLConfiguration(clientConfigInputStream2);
+
+      server.init(serverConfig);
+      serverConfigInputStream.close();
+      Network network = server.unwrap(Network.class);
+      network.addNetworkReqListener(new NetworkReqListener() {
+
+        public Answer processRequest(Request request) {
+          return null;
+        }
+      }, ApplicationId.createByAccAppId(193, 19302));
+      server.start();
+      _wait();
+
+      List<Peer> peers = server.unwrap(PeerTable.class).getPeerTable();
+ assertEquals("Wrong num of connections, initial setup did not succeed. ", 0, peers.size());
+      client1.init(clientConfig1);
+      clientConfigInputStream1.close();
+      network = client1.unwrap(Network.class);
+      network.addNetworkReqListener(new NetworkReqListener() {
+
+        public Answer processRequest(Request request) {
+          return null;
+        }
+      }, ApplicationId.createByAccAppId(193, 19302));
+      client1.start(Mode.ALL_PEERS, 10000, TimeUnit.MILLISECONDS);
+
+ _wait(); // FIXME: This should not be needed. We are checking before peer state is updated...
+
+      peers = server.unwrap(PeerTable.class).getPeerTable();
+ assertEquals("Wrong num of connections, initial setup did not succeed. ", 1, peers.size());
+      IPeer p = (IPeer) peers.get(0);
+ assertTrue("Peer not connected. State[" + p.getState(PeerState.class) + "]", ((IPeer) peers.get(0)).isConnected()); + assertEquals("Peer has wrong realm.", "mobicents.org", p.getRealmName());
+
+      client2.init(clientConfig2);
+      clientConfigInputStream1.close();
+      network = client2.unwrap(Network.class);
+      network.addNetworkReqListener(new NetworkReqListener() {
+
+        public Answer processRequest(Request request) {
+          return null;
+        }
+      }, ApplicationId.createByAccAppId(193, 19302));
+      client2.start(Mode.ALL_PEERS, 10000000, TimeUnit.MILLISECONDS);
+
+ _wait(); // FIXME: This should not be needed. We are checking before peer state is updated...
+
+      peers = server.unwrap(PeerTable.class).getPeerTable();
+ assertEquals("Wrong num of connections, initial setup did not succeed. ", 2, peers.size());
+      p = (IPeer) peers.get(0);
+ assertTrue("Peer not connected. State[" + p.getState(PeerState.class) + "]", ((IPeer) peers.get(0)).isConnected()); + assertEquals("Peer has wrong realm.", "mobicents.org", p.getRealmName());
+      p = (IPeer) peers.get(1);
+ assertTrue("Peer not connected. State[" + p.getState(PeerState.class) + "]", ((IPeer) peers.get(0)).isConnected()); + assertEquals("Peer has wrong realm.", "mobicents.org", p.getRealmName());
+
+    }
+    finally {
+      try {
+        client1.stop(DisconnectCause.REBOOTING);
+        client1.destroy();
+      }
+      catch (Exception e) {
+        logger.warn("Failed to stop/destroy CLIENT stack.", e);
+      }
+
+      try {
+        client2.stop(DisconnectCause.REBOOTING);
+        client2.destroy();
+      }
+      catch (Exception e) {
+        logger.warn("Failed to stop/destroy CLIENT stack.", e);
+      }
+
+      try {
+        server.stop(DisconnectCause.REBOOTING);
+        server.destroy();
+      }
+      catch (Exception e) {
+        logger.warn("Failed to stop/destroy SERVER stack.", e);
+      }
+    }
+  }
+
+  private void _wait() throws InterruptedException {
+    Thread.sleep(3500);
+  }
+}
=======================================
--- /dev/null
+++ /testsuite/tests/src/test/java/org/mobicents/diameter/stack/StackConnectMultiSCTPTest.java Thu Jul 31 01:03:26 2014 UTC
@@ -0,0 +1,55 @@
+/*
+ * TeleStax, Open Source Cloud Communications
+ * Copyright 2011-2014, Telestax Inc. and individual contributors
+ * by the @authors tag.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>
+ */
+
+package org.mobicents.diameter.stack;
+
+import org.junit.Test;
+
+/**
+ *
+ * @author <a href="mailto:[email protected]";> Alexandre Mendonca </a>
+ * @author <a href="mailto:[email protected]";> Bartosz Baranowski </a>
+ */
+public class StackConnectMultiSCTPTest extends StackConnectMultiBaseTest {
+
+  private String serverConfigName = "multi-sctp-jdiameter-server-two.xml";
+  private String clientConfigName1 = "multi-sctp-jdiameter-client-one.xml";
+  private String clientConfigName2 = "multi-sctp-jdiameter-client-two.xml";
+
+  public String getServerConfigName() {
+    return serverConfigName;
+  }
+
+  public String getClient1ConfigName() {
+    return clientConfigName1;
+  }
+
+  public String getClient2ConfigName() {
+    return clientConfigName2;
+  }
+
+  // 1. start server
+  // 2. start client1 + wait for connection
+  // 3. start client2 + wait for connection
+  @Test
+  public void testConnectUndefined() throws Exception {
+    super.testConnectUndefined();
+  }
+
+}
=======================================
--- /dev/null
+++ /testsuite/tests/src/test/java/org/mobicents/diameter/stack/StackConnectMultiTCPTest.java Thu Jul 31 01:03:26 2014 UTC
@@ -0,0 +1,55 @@
+/*
+ * TeleStax, Open Source Cloud Communications
+ * Copyright 2011-2014, Telestax Inc. and individual contributors
+ * by the @authors tag.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>
+ */
+
+package org.mobicents.diameter.stack;
+
+import org.junit.Test;
+
+/**
+ *
+ * @author <a href="mailto:[email protected]";> Alexandre Mendonca </a>
+ * @author <a href="mailto:[email protected]";> Bartosz Baranowski </a>
+ */
+public class StackConnectMultiTCPTest extends StackConnectMultiBaseTest {
+
+  private String serverConfigName = "multi-tcp-jdiameter-server-two.xml";
+  private String clientConfigName1 = "multi-tcp-jdiameter-client-one.xml";
+  private String clientConfigName2 = "multi-tcp-jdiameter-client-two.xml";
+
+  public String getServerConfigName() {
+    return serverConfigName;
+  }
+
+  public String getClient1ConfigName() {
+    return clientConfigName1;
+  }
+
+  public String getClient2ConfigName() {
+    return clientConfigName2;
+  }
+
+  // 1. start server
+  // 2. start client1 + wait for connection
+  // 3. start client2 + wait for connection
+  @Test
+  public void testConnectUndefined() throws Exception {
+    super.testConnectUndefined();
+  }
+
+}
=======================================
--- /dev/null
+++ /testsuite/tests/src/test/resources/configurations/multi-sctp-jdiameter-client-one.xml Thu Jul 31 01:03:26 2014 UTC
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<Configuration xmlns="http://www.jdiameter.org/jdiameter-server";>
+
+  <LocalPeer>
+    <URI value="aaa://client1.mobicents.org:13868" />
+    <IPAddresses>
+      <IPAddress value="127.0.0.1" />
+    </IPAddresses>
+    <Realm value="mobicents.org" />
+    <VendorID value="193" />
+    <ProductName value="jDiameter" />
+    <FirmwareRevision value="1" />
+    <OverloadMonitor>
+      <Entry index="1" lowThreshold="0.5" highThreshold="0.6">
+        <ApplicationID>
+          <VendorId value="193" />
+          <AuthApplId value="0" />
+          <AcctApplId value="19302" />
+        </ApplicationID>
+      </Entry>
+    </OverloadMonitor>
+  </LocalPeer>
+
+  <Parameters>
+    <AcceptUndefinedPeer value="true" />
+    <DuplicateProtection value="true" />
+    <DuplicateTimer value="240000" />
+    <UseUriAsFqdn value="true" />
+    <QueueSize value="10000" />
+    <MessageTimeOut value="60000" />
+    <StopTimeOut value="10000" />
+    <CeaTimeOut value="10000" />
+    <IacTimeOut value="30000" />
+    <DwaTimeOut value="10000" />
+    <DpaTimeOut value="5000" />
+    <RecTimeOut value="10000" />
+
+    <!-- Statistics Logger Configuration -->
+ <Statistics pause="30000" delay="30000" enabled="true" active_records="Concurrent,ScheduledExecService,Network,ScheduledExecService,AppGenRequestPerSecond,NetGenRequestPerSecond,Peer,Peer.local,PeerFSM"/>
+
+    <Concurrent>
+      <Entity name="ThreadGroup" size="64"/> <!-- Common Thread Pool -->
+      <Entity name="ProcessingMessageTimer" size="1"/>
+      <Entity name="DuplicationMessageTimer" size="1"/>
+      <Entity name="RedirectMessageTimer" size="1"/>
+      <Entity name="PeerOverloadTimer" size="1"/>
+      <Entity name="ConnectionTimer" size="1"/>
+      <Entity name="StatisticTimer" size="1"/>
+    </Concurrent>
+    <Dictionary enabled="false" sendLevel="MESSAGE" receiveLevel="OFF" />
+    <!-- To enable clustering uncomment the following lines
+ <SessionDatasource value="org.mobicents.diameter.impl.ha.data.ReplicatedDataSource"/> + <TimerFacility value="org.mobicents.diameter.impl.ha.timer.ReplicatedTimerFacilityImpl"/>
+    -->
+    </Parameters>
+
+  <Network>
+    <Peers>
+ <Peer name="aaa://127.0.0.2:3868" attempt_connect="true" rating="1" />
+    </Peers>
+
+    <Realms>
+ <Realm name="test.mobicents.org" peers="127.0.0.1,127.0.0.2" local_action="LOCAL" dynamic="false" exp_time="1">
+        <ApplicationID>
+          <VendorId value="193" />
+          <AuthApplId value="0" />
+          <AcctApplId value="19302" />
+        </ApplicationID>
+      </Realm>
+    </Realms>
+  </Network>
+
+  <Extensions>
+ <!-- Set SCTP classes as extension points for Connection and Network Guard --> + <Connection value="org.jdiameter.client.impl.transport.sctp.SCTPClientConnection" />
+    <NetworkGuard value="org.jdiameter.server.impl.io.sctp.NetworkGuard" />
+  </Extensions>
+
+</Configuration>
=======================================
--- /dev/null
+++ /testsuite/tests/src/test/resources/configurations/multi-sctp-jdiameter-client-two.xml Thu Jul 31 01:03:26 2014 UTC
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<Configuration xmlns="http://www.jdiameter.org/jdiameter-server";>
+
+  <LocalPeer>
+    <URI value="aaa://client2.mobicents.org:13868" />
+    <IPAddresses>
+      <IPAddress value="127.0.0.2" />
+    </IPAddresses>
+    <Realm value="mobicents.org" />
+    <VendorID value="193" />
+    <ProductName value="jDiameter" />
+    <FirmwareRevision value="1" />
+    <OverloadMonitor>
+      <Entry index="1" lowThreshold="0.5" highThreshold="0.6">
+        <ApplicationID>
+          <VendorId value="193" />
+          <AuthApplId value="0" />
+          <AcctApplId value="19302" />
+        </ApplicationID>
+      </Entry>
+    </OverloadMonitor>
+  </LocalPeer>
+
+  <Parameters>
+    <AcceptUndefinedPeer value="true" />
+    <DuplicateProtection value="true" />
+    <DuplicateTimer value="240000" />
+    <UseUriAsFqdn value="true" />
+    <QueueSize value="10000" />
+    <MessageTimeOut value="60000" />
+    <StopTimeOut value="10000" />
+    <CeaTimeOut value="10000" />
+    <IacTimeOut value="30000" />
+    <DwaTimeOut value="10000" />
+    <DpaTimeOut value="5000" />
+    <RecTimeOut value="10000" />
+
+    <!-- Statistics Logger Configuration -->
+ <Statistics pause="30000" delay="30000" enabled="true" active_records="Concurrent,ScheduledExecService,Network,ScheduledExecService,AppGenRequestPerSecond,NetGenRequestPerSecond,Peer,Peer.local,PeerFSM"/>
+
+    <Concurrent>
+      <Entity name="ThreadGroup" size="64"/> <!-- Common Thread Pool -->
+      <Entity name="ProcessingMessageTimer" size="1"/>
+      <Entity name="DuplicationMessageTimer" size="1"/>
+      <Entity name="RedirectMessageTimer" size="1"/>
+      <Entity name="PeerOverloadTimer" size="1"/>
+      <Entity name="ConnectionTimer" size="1"/>
+      <Entity name="StatisticTimer" size="1"/>
+    </Concurrent>
+    <Dictionary enabled="false" sendLevel="MESSAGE" receiveLevel="OFF" />
+    <!-- To enable clustering uncomment the following lines
+ <SessionDatasource value="org.mobicents.diameter.impl.ha.data.ReplicatedDataSource"/> + <TimerFacility value="org.mobicents.diameter.impl.ha.timer.ReplicatedTimerFacilityImpl"/>
+    -->
+    </Parameters>
+
+  <Network>
+    <Peers>
+ <Peer name="aaa://127.0.0.22:3868" attempt_connect="true" rating="1" />
+    </Peers>
+
+    <Realms>
+ <Realm name="test.mobicents.org" peers="127.0.0.2,127.0.0.22" local_action="LOCAL" dynamic="false" exp_time="1">
+        <ApplicationID>
+          <VendorId value="193" />
+          <AuthApplId value="0" />
+          <AcctApplId value="19302" />
+        </ApplicationID>
+      </Realm>
+    </Realms>
+  </Network>
+
+  <Extensions>
+ <!-- Set SCTP classes as extension points for Connection and Network Guard --> + <Connection value="org.jdiameter.client.impl.transport.sctp.SCTPClientConnection" />
+    <NetworkGuard value="org.jdiameter.server.impl.io.sctp.NetworkGuard" />
+  </Extensions>
+
+</Configuration>
=======================================
--- /dev/null
+++ /testsuite/tests/src/test/resources/configurations/multi-sctp-jdiameter-server-two.xml Thu Jul 31 01:03:26 2014 UTC
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<Configuration xmlns="http://www.jdiameter.org/jdiameter-server";>
+
+  <LocalPeer>
+    <URI value="aaa://127.0.0.2:3868" />
+    <IPAddresses>
+      <IPAddress value="127.0.0.2" />
+      <IPAddress value="127.0.0.22" />
+    </IPAddresses>
+    <Realm value="mobicents.org" />
+    <VendorID value="193" />
+    <ProductName value="jDiameter" />
+    <FirmwareRevision value="1" />
+    <OverloadMonitor>
+      <Entry index="1" lowThreshold="0.5" highThreshold="0.6">
+        <ApplicationID>
+          <VendorId value="193" />
+          <AuthApplId value="0" />
+          <AcctApplId value="19302" />
+        </ApplicationID>
+      </Entry>
+    </OverloadMonitor>
+  </LocalPeer>
+
+  <Parameters>
+    <AcceptUndefinedPeer value="true" />
+    <DuplicateProtection value="true" />
+    <DuplicateTimer value="240000" />
+    <UseUriAsFqdn value="false" />
+    <QueueSize value="10000" />
+    <MessageTimeOut value="60000" />
+    <StopTimeOut value="10000" />
+    <CeaTimeOut value="10000" />
+    <IacTimeOut value="30000" />
+    <DwaTimeOut value="10000" />
+    <DpaTimeOut value="5000" />
+    <RecTimeOut value="10000" />
+
+    <!-- Statistics Logger Configuration -->
+ <Statistics pause="30000" delay="30000" enabled="true" active_records="Concurrent,ScheduledExecService,Network,ScheduledExecService,AppGenRequestPerSecond,NetGenRequestPerSecond,Peer,Peer.local,PeerFSM"/>
+
+    <Concurrent>
+      <Entity name="ThreadGroup" size="64"/> <!-- Common Thread Pool -->
+      <Entity name="ProcessingMessageTimer" size="1"/>
+      <Entity name="DuplicationMessageTimer" size="1"/>
+      <Entity name="RedirectMessageTimer" size="1"/>
+      <Entity name="PeerOverloadTimer" size="1"/>
+      <Entity name="ConnectionTimer" size="1"/>
+      <Entity name="StatisticTimer" size="1"/>
+    </Concurrent>
+    <Dictionary enabled="false" sendLevel="MESSAGE" receiveLevel="OFF" />
+    <!-- To enable clustering uncomment the following lines
+ <SessionDatasource value="org.mobicents.diameter.impl.ha.data.ReplicatedDataSource"/> + <TimerFacility value="org.mobicents.diameter.impl.ha.timer.ReplicatedTimerFacilityImpl"/>
+    -->
+    </Parameters>
+
+  <Network>
+    <Peers>
+ <Peer name="client1.mobicents.org" attempt_connect="false" rating="1" /> + <Peer name="client2.mobicents.org"" attempt_connect="false" rating="1" />
+    </Peers>
+
+    <Realms>
+ <Realm name="test.mobicents.org" peers="127.0.0.1,127.0.0.2,127.0.0.22" local_action="LOCAL" dynamic="false" exp_time="1">
+        <ApplicationID>
+          <VendorId value="193" />
+          <AuthApplId value="0" />
+          <AcctApplId value="19302" />
+        </ApplicationID>
+      </Realm>
+    </Realms>
+  </Network>
+
+  <Extensions>
+ <!-- Set SCTP classes as extension points for Connection and Network Guard --> + <Connection value="org.jdiameter.client.impl.transport.sctp.SCTPClientConnection" />
+    <NetworkGuard value="org.jdiameter.server.impl.io.sctp.NetworkGuard" />
+  </Extensions>
+
+</Configuration>
=======================================
--- /dev/null
+++ /testsuite/tests/src/test/resources/configurations/multi-tcp-jdiameter-client-one.xml Thu Jul 31 01:03:26 2014 UTC
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<Configuration xmlns="http://www.jdiameter.org/jdiameter-server";>
+
+  <LocalPeer>
+    <URI value="aaa://client1.mobicents.org:13868" />
+    <IPAddresses>
+      <IPAddress value="127.0.0.1" />
+    </IPAddresses>
+    <Realm value="mobicents.org" />
+    <VendorID value="193" />
+    <ProductName value="jDiameter" />
+    <FirmwareRevision value="1" />
+    <OverloadMonitor>
+      <Entry index="1" lowThreshold="0.5" highThreshold="0.6">
+        <ApplicationID>
+          <VendorId value="193" />
+          <AuthApplId value="0" />
+          <AcctApplId value="19302" />
+        </ApplicationID>
+      </Entry>
+    </OverloadMonitor>
+  </LocalPeer>
+
+  <Parameters>
+    <AcceptUndefinedPeer value="true" />
+    <DuplicateProtection value="true" />
+    <DuplicateTimer value="240000" />
+    <UseUriAsFqdn value="true" />
+    <QueueSize value="10000" />
+    <MessageTimeOut value="60000" />
+    <StopTimeOut value="10000" />
+    <CeaTimeOut value="10000" />
+    <IacTimeOut value="30000" />
+    <DwaTimeOut value="10000" />
+    <DpaTimeOut value="5000" />
+    <RecTimeOut value="10000" />
+
+    <!-- Statistics Logger Configuration -->
+    <Statistics pause="30000" delay="30000" enabled="true"
+ active_records="Concurrent,ScheduledExecService,Network,ScheduledExecService,AppGenRequestPerSecond,NetGenRequestPerSecond,Peer,Peer.local,PeerFSM" />
+
+    <Concurrent>
+      <Entity name="ThreadGroup" size="64" /> <!-- Common Thread Pool -->
+      <Entity name="ProcessingMessageTimer" size="1" />
+      <Entity name="DuplicationMessageTimer" size="1" />
+      <Entity name="RedirectMessageTimer" size="1" />
+      <Entity name="PeerOverloadTimer" size="1" />
+      <Entity name="ConnectionTimer" size="1" />
+      <Entity name="StatisticTimer" size="1" />
+    </Concurrent>
+    <Dictionary enabled="false" sendLevel="MESSAGE"
+      receiveLevel="OFF" />
+ <!-- To enable clustering uncomment the following lines <SessionDatasource + value="org.mobicents.diameter.impl.ha.data.ReplicatedDataSource"/> <TimerFacility + value="org.mobicents.diameter.impl.ha.timer.ReplicatedTimerFacilityImpl"/> -->
+  </Parameters>
+
+  <Network>
+    <Peers>
+ <Peer name="aaa://127.0.0.2:3868" attempt_connect="true" portRange="25000-35000" rating="1" />
+    </Peers>
+
+    <Realms>
+ <Realm name="test.mobicents.org" peers="127.0.0.1,127.0.0.2" local_action="LOCAL" dynamic="false" exp_time="1">
+        <ApplicationID>
+          <VendorId value="193" />
+          <AuthApplId value="0" />
+          <AcctApplId value="19302" />
+        </ApplicationID>
+      </Realm>
+    </Realms>
+  </Network>
+
+  <Extensions />
+
+</Configuration>
=======================================
--- /dev/null
+++ /testsuite/tests/src/test/resources/configurations/multi-tcp-jdiameter-client-two.xml Thu Jul 31 01:03:26 2014 UTC
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<Configuration xmlns="http://www.jdiameter.org/jdiameter-server";>
+
+  <LocalPeer>
+    <URI value="aaa://client2.mobicents.org:13868" />
+    <IPAddresses>
+      <IPAddress value="127.0.0.2" />
+    </IPAddresses>
+    <Realm value="mobicents.org" />
+    <VendorID value="193" />
+    <ProductName value="jDiameter" />
+    <FirmwareRevision value="1" />
+    <OverloadMonitor>
+      <Entry index="1" lowThreshold="0.5" highThreshold="0.6">
+        <ApplicationID>
+          <VendorId value="193" />
+          <AuthApplId value="0" />
+          <AcctApplId value="19302" />
+        </ApplicationID>
+      </Entry>
+    </OverloadMonitor>
+  </LocalPeer>
+
+  <Parameters>
+    <AcceptUndefinedPeer value="true" />
+    <DuplicateProtection value="true" />
+    <DuplicateTimer value="240000" />
+    <UseUriAsFqdn value="false" />
+    <QueueSize value="10000" />
+    <MessageTimeOut value="60000" />
+    <StopTimeOut value="10000" />
+    <CeaTimeOut value="10000" />
+    <IacTimeOut value="30000" />
+    <DwaTimeOut value="10000" />
+    <DpaTimeOut value="5000" />
+    <RecTimeOut value="10000" />
+
+    <!-- Statistics Logger Configuration -->
+ <Statistics pause="30000" delay="30000" enabled="true" active_records="Concurrent,ScheduledExecService,Network,ScheduledExecService,AppGenRequestPerSecond,NetGenRequestPerSecond,Peer,Peer.local,PeerFSM"/>
+
+    <Concurrent>
+      <Entity name="ThreadGroup" size="64"/> <!-- Common Thread Pool -->
+      <Entity name="ProcessingMessageTimer" size="1"/>
+      <Entity name="DuplicationMessageTimer" size="1"/>
+      <Entity name="RedirectMessageTimer" size="1"/>
+      <Entity name="PeerOverloadTimer" size="1"/>
+      <Entity name="ConnectionTimer" size="1"/>
+      <Entity name="StatisticTimer" size="1"/>
+    </Concurrent>
+    <Dictionary enabled="false" sendLevel="MESSAGE" receiveLevel="OFF" />
+    <!-- To enable clustering uncomment the following lines
+ <SessionDatasource value="org.mobicents.diameter.impl.ha.data.ReplicatedDataSource"/> + <TimerFacility value="org.mobicents.diameter.impl.ha.timer.ReplicatedTimerFacilityImpl"/>
+    -->
+    </Parameters>
+
+  <Network>
+    <Peers>
+ <Peer name="aaa://127.0.0.22:3868" attempt_connect="true" portRange="25000-35000" rating="1" />
+    </Peers>
+
+    <Realms>
+ <Realm name="test.mobicents.org" peers="127.0.0.2,127.0.0.22" local_action="LOCAL" dynamic="false" exp_time="1">
+        <ApplicationID>
+          <VendorId value="193" />
+          <AuthApplId value="0" />
+          <AcctApplId value="19302" />
+        </ApplicationID>
+      </Realm>
+    </Realms>
+  </Network>
+
+  <Extensions />
+
+</Configuration>
=======================================
--- /dev/null
+++ /testsuite/tests/src/test/resources/configurations/multi-tcp-jdiameter-server-two.xml Thu Jul 31 01:03:26 2014 UTC
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<Configuration xmlns="http://www.jdiameter.org/jdiameter-server";>
+
+  <LocalPeer>
+    <URI value="aaa://127.0.0.2:3868" />
+    <IPAddresses>
+      <IPAddress value="127.0.0.2" />
+      <IPAddress value="127.0.0.22" />
+    </IPAddresses>
+    <Realm value="mobicents.org" />
+    <VendorID value="193" />
+    <ProductName value="jDiameter" />
+    <FirmwareRevision value="1" />
+    <OverloadMonitor>
+      <Entry index="1" lowThreshold="0.5" highThreshold="0.6">
+        <ApplicationID>
+          <VendorId value="193" />
+          <AuthApplId value="0" />
+          <AcctApplId value="19302" />
+        </ApplicationID>
+      </Entry>
+    </OverloadMonitor>
+  </LocalPeer>
+
+  <Parameters>
+    <AcceptUndefinedPeer value="true" />
+    <DuplicateProtection value="true" />
+    <DuplicateTimer value="240000" />
+    <UseUriAsFqdn value="false" />
+    <QueueSize value="10000" />
+    <MessageTimeOut value="60000" />
+    <StopTimeOut value="10000" />
+    <CeaTimeOut value="10000" />
+    <IacTimeOut value="30000" />
+    <DwaTimeOut value="10000" />
+    <DpaTimeOut value="5000" />
+    <RecTimeOut value="10000" />
+
+    <!-- Statistics Logger Configuration -->
+ <Statistics pause="30000" delay="30000" enabled="true" active_records="Concurrent,ScheduledExecService,Network,ScheduledExecService,AppGenRequestPerSecond,NetGenRequestPerSecond,Peer,Peer.local,PeerFSM"/>
+
+    <Concurrent>
+      <Entity name="ThreadGroup" size="64"/> <!-- Common Thread Pool -->
+      <Entity name="ProcessingMessageTimer" size="1"/>
+      <Entity name="DuplicationMessageTimer" size="1"/>
+      <Entity name="RedirectMessageTimer" size="1"/>
+      <Entity name="PeerOverloadTimer" size="1"/>
+      <Entity name="ConnectionTimer" size="1"/>
+      <Entity name="StatisticTimer" size="1"/>
+    </Concurrent>
+    <Dictionary enabled="false" sendLevel="MESSAGE" receiveLevel="OFF" />
+    <!-- To enable clustering uncomment the following lines
+ <SessionDatasource value="org.mobicents.diameter.impl.ha.data.ReplicatedDataSource"/> + <TimerFacility value="org.mobicents.diameter.impl.ha.timer.ReplicatedTimerFacilityImpl"/>
+    -->
+    </Parameters>
+
+  <Network>
+    <Peers>
+ <Peer name="client1.mobicents.org" attempt_connect="false" portRange="25000-35000" rating="1" /> + <Peer name="client2.mobicents.org" attempt_connect="false" portRange="25000-35000" rating="1" />
+    </Peers>
+
+    <Realms>
+ <Realm name="test.mobicents.org" peers="127.0.0.1,127.0.0.2,127.0.0.22" local_action="LOCAL" dynamic="false" exp_time="1">
+        <ApplicationID>
+          <VendorId value="193" />
+          <AuthApplId value="0" />
+          <AcctApplId value="19302" />
+        </ApplicationID>
+      </Realm>
+    </Realms>
+  </Network>
+
+  <Extensions />
+
+</Configuration>

--

--- You received this message because you are subscribed to the Google Groups "mobicents-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to