aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test/diameter_transport_SUITE.erl
AgeCommit message (Collapse)Author
2016-06-11Use rand(3) instead of random(3)Anders Svensson
The latter is deprecated in OTP 19.
2016-05-30Close listening sockets at transport removalAnders Svensson
The transport interface documented in diameter_transport(3) is used to start/stop accepting/connecting transport processes: they're started with a function call, and told to die with their parent process. In the accepting case, both diameter_tcp and diameter_sctp start a listening process when the first accepting transport is started. However, there's no way for a listening process to find out that that it should stop listening when transport configuration is removed. Both diameter_tcp and diameter_sctp have used a timer to terminate the listening process after all existing accepting processes have died as a consequence of transport removal. The problem with this is that nothing stops a new client from connecting before this, and also that no new transport can succeed in opening the same listening port (eg. reconfiguration) until the old listener dies. This commit solves the problem by adding diameter_reg:subscribe/2, to allow callers to subscribe to messages about added/removed associations. A call to diameter:add_transport/2 results in a new child process that registers a term that a listening process subscribes to. Transport removal results in the death of the child, and the resulting notification to the listener causes the latter to close its socket and terminate. This is still an internal interface, but the subscription mechanism should probably be made external (eg. a diameter:subscribe/1 that can be used to subscribe to specified messages), so that transport modules other than diameter's own can make use of it. There is no support for soft upgrade.
2015-08-13Merge branch 'maint-17' into maintAnders Svensson
The diffs are all about adapting to the OTP 18 time interface. The code was previously backwards compatible, falling back on the erlang:now/0 if erlang:monotonic_time/0 is unavailable, but this was seen to be a bad thing in commit 9c0f2f2c. Use of erlang:now/0 is now removed.
2015-08-05Simplify time manipulationAnders Svensson
By doing away with more wrapping that the parent commit started to remove.
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-24Tweak transport suite failuresAnders Svensson
Make anything but a comm_up sctp_assoc_change crash. Make timeouts more reasonable.
2015-03-05Merge branch 'anders/diameter/time/OTP-12439' into maintAnders Svensson
* anders/diameter/time/OTP-12439: Use new time api in test suites Use new time api in implementation
2015-02-24Fix SCTP match blunder in suitesAnders Svensson
More than an incoming message can contain ancillary data, which the gen_sctp and transport suites did not expect. On FreeBSD 10, an sctp_assoc_change event appears always to contain ancillary data.
2015-02-20Use new time api in test suitesAnders Svensson
Where it's less important to do so, but it has to be done at some point since erlang:now/0 is deprecated. As in the parent commit, continue to use the old api if the new one is unavailable.
2015-02-20Simplify transport suiteAnders Svensson
Using the fact that transport processes can now be started concurrently. The suite serialized starts itself when pretending to be diameter starting a transport process.
2015-02-20Add pool suite to test transport_opt() pool_sizeAnders Svensson
With testcases that uses restrict_connections and pool_size config to establish multiple connections between two Diameter nodes, checking for the expected number of transport processes using diameter:service_info/2.
2014-11-03Rename reconnect_timer to connect_timer in examples and suitesAnders Svensson
The timer was renamed in commit abea7186.
2013-07-12Comment tweaksAnders Svensson
2013-04-12Merge branch 'anders/diameter/watchdog_leak/OTP-11019' into maintAnders Svensson
* anders/diameter/watchdog_leak/OTP-11019: Minor doc fix Add testcase to exercise reconnect behaviour Fix watchdog table leak
2013-04-11Add testcase to exercise reconnect behaviourAnders Svensson
2013-04-11Comment fixAnders Svensson
2013-04-11More robust listening port lookup in test suitesAnders Svensson
In particular, remove timing dependence by using diameter_reg:wait/1 to wait on the term registered by diameter_{tcp,sctp} when opening a listening socket.
2011-12-16Remove {init,end}_per_group workaroundAnders Svensson
This undoes commit 162c0d3ee30790ec5a75e20b0e2e8bc61ed92375.
2011-12-16Use new syntax for specifying ct group propertiesAnders Svensson
No longer have to duplicate groups for sequential and parallel runs.
2011-12-16Remove delay from connect in transport suiteAnders Svensson
There should be no need for it, previous introduction was misguided.
2011-12-16Handle only error return as evidence of no SCTPAnders Svensson
That is, remove the catch for the pre-R15 behaviour.
2011-12-06Skip sctp tests on {error, esocktnosupport}Anders Svensson
This is returned on MontaVista 4.0.1, Linux 2.6.10. On Solaris 9 (for one at least) it's eprotonosupport.
2011-12-02Remove unnecessary includesAnders Svensson
2011-11-10Simplify handling of generated hrls in testsuitesAnders Svensson
Just morph include into include_lib when releasing. Not using include_lib here is due to generated hrls not residing in diameter/include until after release. See release.sed.
2011-10-10Use tcp/sctp port resolution from testsuitesAnders Svensson
2011-10-10Merge branch 'anders/diameter/testsuite_robustness/OTP-9619'Anders Svensson
* anders/diameter/testsuite_robustness/OTP-9619: Make testsuites more robust in case of init failure
2011-10-10gen_sctp:open/0-2 might return {error, eprotonosupport}Anders Svensson
Previously error:badarg was raise if there was no underlying support for SCTP. Handle both new and old failure until OTP-9239 is merged.
2011-10-07Make testsuites more robust in case of init failureAnders Svensson
In particular, move code out of init_per_suite since failure causes end_per_suite to be skipped. Cleanup is simpler if both init and cleanup happen as testcases.
2011-09-27Explicit {init,end}_per_group/2 to work around ct bugAnders Svensson
Without these functions the result pages are currently mangled. The overview page shows that no suites have run, even though all in fact are, and diameter-specific page is truncated after the dict suite, which is the first suite that relied on an implicit {init,end}_per_group/2. This is apparently the result of a recent common_test commit.
2011-09-26Use groups for parallel testcase executionAnders Svensson
2011-09-26Remove gen_sctp suite since it's not diameter-specificAnders Svensson
2011-09-26Add transport and gen_sctp suitesAnders Svensson