Commit Graph

48 Commits

Author SHA1 Message Date
Ivan Kozlovic
eb0eabff04 Replace all changes with simple 25ms delay after connection close. 2016-02-03 18:58:42 -07:00
Ivan Kozlovic
437458e13e Fix completeConnection + fix monitor test.
Don't check what is sent back. The point is that the client should be fully initialized at this point.
We can't ensure using metrics that the "check" connection is gone since in some tests, the server is started and clients auto-reconnect to it.
For tests that depend on the number of clients connected (such as the monitor one), have specific code for those tests.
2016-02-03 18:08:52 -07:00
Ivan Kozlovic
0a4da78f38 Fix code that checks that server is started + route test
- The raw connection used to check that the server is started now consumes the INFO and sends PING and consumes PONG before returning.
- The route test needs to make sure that the client connection has client id 2. Using PING/PONG before creating route connection to make sure of that.
2016-02-03 15:01:00 -07:00
Derek Collison
e9b5839bf0 Merge branch 'discovery' 2015-12-16 14:18:34 -08:00
Derek Collison
8393c3c994 Basic INFO for cluster auto-discovery, Addresses #126 2015-12-16 12:36:24 -08:00
Ivan Kozlovic
d133e68338 Adapt tests for Travis GCE.
* Add server.GetListenEndpoint() to return options' host and port when server is ready to accept client connections. The server can be asked to pick a random port. This function returns a string of the form "host:port" with the port selected by the net.Listen() call.
* Replace the use of server.Addr() with above function to connect to the starting server (using net.Dial) to check for success. The original issue was that, when no hostname is specified in the configuration, the server uses 0.0.0.0 for the listen address. However, server.Addr() would return "[::]", even on a machine with IPv6 disabled, which would cause the net.Dial call to fail with "network unreachable".
2015-12-10 13:06:18 -07:00
Ivan Kozlovic
9b25a379b8 Increase TLS timeout in config files
We would get failures on Travis, I would think because of small TLS timeout. Increase (or set) the TLS timeout to 2 seconds in most configuration files. Update tests that relied on the original value.
2015-12-08 15:20:20 -07:00
Derek Collison
749d4f89cc First pass at client TLS support 2015-10-22 03:30:27 +02:00
Derek Collison
fe3b8f2aa1 BufSize option, bump for go1.5.1, bump version 2015-09-18 07:41:33 -07:00
Derek Collison
45564dbde2 race fixes, go1.5 on travis 2015-09-17 19:02:00 -07:00
Derek Collison
075529e2fe Properly handle and enforce max payload 2015-08-05 22:05:58 -07:00
Derek Collison
96bab33075 fixed import paths 2015-06-19 12:08:11 -07:00
Derek Collison
d9c7392c4d race fixes, tests 2015-06-16 12:48:50 -07:00
Máximo Cuadros Ortiz
65ae9c16f2 extendable auth methods 2014-11-27 00:26:13 +01:00
Derek Collison
65ff554574 Better split buffer testing for CONNECT, fixes issue #63. 2014-11-16 08:58:36 -08:00
Derek Collison
9dc875b88e pedantic about over zealous GC for sockets 2014-09-18 21:25:13 -07:00
Alex Toombs
20b08f5a33 Allow nats to choose a random port when given port -1.
* In order to allow nats to resolve a randomly-chosen port, we want to
  sometimes give net.Listen a port of 0. However, a port of 0 in the
  config resolve to a constant port. In order to avoid behavioral
  changes, we define '-1' to be the default "choose random port"
  number.
* Resolve ports can be retrievd using the server's Addr() method.
2014-06-05 19:48:42 -07:00
Derek Collison
e172f4bdf9 Fixed issue #29 with subscriptions leaking across routes on auto-unsubscribe 2014-04-30 14:18:42 -07:00
Derek Collison
7da1e87748 copyright hygiene 2014-02-06 19:34:12 -08:00
Derek Collison
edc49b7924 Fixes issues #21 and #22 2014-02-06 19:24:11 -08:00
Derek Collison
71c0c28ced copyright hygiene 2013-10-16 13:40:15 -07:00
Derek Collison
4e1502cc4c README license, copyright cleanup, etc 2013-09-30 10:16:43 -07:00
Derek Collison
cf0f30200f log file support, data race fixes 2013-08-02 16:52:54 -07:00
Derek Collison
f27deeabee Added official start method 2013-07-30 19:23:26 -07:00
Derek Collison
bca2ccd7d3 Release route connect Go routines on shutdown 2013-07-30 11:19:33 -07:00
Derek Collison
4e2ee9425d Send local subs, tests cleanups 2013-07-30 09:52:46 -07:00
Derek Collison
b136f41fdb Queue Subscriber rework 2013-07-29 22:33:16 -07:00
Derek Collison
d099467d2a Multiple routes w/ same Id 2013-07-29 20:15:55 -07:00
Derek Collison
de469cada6 Reconnect logic 2013-07-29 20:02:47 -07:00
Derek Collison
c61412a862 Only send over route once 2013-07-29 18:13:32 -07:00
Derek Collison
025b63300b 1-hop semantics for messages from routes 2013-07-29 17:09:41 -07:00
Derek Collison
ec4a46c959 MSG proto processing 2013-07-29 15:48:07 -07:00
Derek Collison
dd99fd12ab First pass soliciting routes with auth 2013-07-28 09:33:13 -07:00
Derek Collison
72b68bf363 Added sub and unsub broadcast to routes 2013-07-27 22:05:15 -07:00
Derek Collison
5189dba7b6 Cluster startup 2013-07-27 16:29:25 -07:00
Derek Collison
ec391c9f86 Suppress logs in default test server 2013-07-17 08:07:48 -05:00
Derek Collison
e3965bcfcc Export running a test Go routine server 2013-07-17 08:04:09 -05:00
Derek Collison
9018bb5876 More descriptive panic 2013-02-22 17:31:53 -08:00
Derek Collison
b763c36157 Added periodic PING support 2012-12-20 14:34:49 -08:00
Derek Collison
c2e263223d Moved tests to use Go routine based server 2012-12-19 17:45:14 -08:00
Derek Collison
ec9c016464 removed fmt 2012-12-18 17:26:43 -08:00
Derek Collison
fb79a982ef Added ability to run server as a Go routine 2012-12-18 16:56:49 -08:00
Derek Collison
cc946365db Increase read deadline for responses 2012-12-05 17:22:48 -08:00
Derek Collison
99ef5ad55c print err when server can't start 2012-12-05 17:04:33 -08:00
Derek Collison
2968ea1538 auth support, cleanup 2012-12-05 16:59:48 -08:00
Derek Collison
56cfcac374 Enable verbose mode 2012-11-29 16:52:10 -08:00
Derek Collison
0c96bc51e3 Wait up to 1 second to connect 2012-11-20 14:53:49 -08:00
Derek Collison
d229d75432 Added general testing between client/server 2012-11-15 09:08:17 -08:00