Commit Graph

412 Commits

Author SHA1 Message Date
Derek Collison
1ebf896980 Fixup for default options 2016-05-03 16:51:23 -07:00
Derek Collison
b5a1365349 Set default host for cluster 2016-05-03 16:44:32 -07:00
Ivan Kozlovic
b36e9fe137 Move usage.go from server to main package 2016-05-03 16:51:57 -06:00
Derek Collison
7b33905db5 beta2 2016-05-03 13:00:18 -07:00
Colin Sullivan
79b4e6be10 While locally tested, this test wasn't being run with the original enhancement.
* Include the test for windows
* Call ProcUsage (versus procUsage), as test was moved.
2016-05-02 15:25:07 -06:00
Ivan Kozlovic
bb81a37cdc Fix flapping test
Introduce sleep when checking activity updates. I had fixed it
originally for Windows and then made it for all platform recently
but only for the publish case. I missed the subscribe test.
2016-04-26 18:14:01 -06:00
Ivan Kozlovic
19ea9c5a60 Add test for Connz Total connections 2016-04-26 18:00:58 -06:00
Colin Sullivan
8a07a02a97 Rename the field to 'total'. 2016-04-26 17:49:09 -06:00
Colin Sullivan
19d4848008 Access server clients within lock. 2016-04-26 17:34:03 -06:00
Colin Sullivan
a6dfe88746 Add a live connection count to /connz monitoring. 2016-04-26 17:24:01 -06:00
Derek Collison
36689b03c8 updates for release prep 2016-04-26 13:51:13 -07:00
Derek Collison
603011d0e6 Merge pull request #252 from nats-io/fix_win_build
Fix Windows build
2016-04-22 18:36:37 -07:00
Derek Collison
12fdd5dead Merge pull request #256 from nats-io/fix_data_race
Fix data race
2016-04-22 18:28:31 -07:00
Ivan Kozlovic
3691d14426 Fix missing capture of remoteID in removeClient
This needed to be captured under the client lock. Adding a test
that captured the races (when running enough times).
2016-04-22 18:06:38 -06:00
Ivan Kozlovic
3850b05388 Fix data race
When processing a connect request, there was a risk of race condition
when the server was being shutdown. Capture fields that are checked
under lock and lock when setting the route's remote ID.

Resolves #255
2016-04-22 17:28:41 -06:00
Ivan Kozlovic
acddee9c4a Fix flapping test 2016-04-22 17:10:33 -06:00
Ivan Kozlovic
a5c393f79a Add check for route TLS handshake error 2016-04-22 16:18:59 -06:00
Ivan Kozlovic
16bd806c46 Move definition of tls usage outside of function that prints it 2016-04-22 15:22:04 -06:00
Colin Sullivan
88af5f193a Add TestTlsCipher. 2016-04-22 15:00:19 -06:00
Ivan Kozlovic
2b8891364a Add more code coverage for server's parser
Test error conditions.
2016-04-22 14:41:19 -06:00
Ivan Kozlovic
ad1198db85 Add code coverage
-Test coverage was no longer triggered due to the check for BUILD_GOOS
 environment variable that was removed. Removed the check.
-Re-run test package with server code coverage.
-Remove unused functions in test.go.
-Add test for a function in test.go.
-Add missing parse +OK test.
2016-04-22 13:03:04 -06:00
Ivan Kozlovic
7a43747107 Remove comment 2016-04-22 07:45:20 -06:00
Ivan Kozlovic
bff3603606 Fix Windows build
Code referenced Debugf which is not available in this package
2016-04-21 18:34:24 -06:00
Ivan Kozlovic
3a999c1299 Add tracking of most go routines started by the server
Refactor the way client is initialized. We need to ensure that
clients are not added to the clients map and readLoop started if
the server is in the process of being shutdown otherwise there
is a chance that the server already gathered the list of connections
to close and this one would not be included, leaving a readLoop
running.
Same occurs for routes, with the complexity that the readLoop is
started well before the route connection is added to the server
routes' list. We need a temporary map that contains those connections
to be able to close them on server Shutdown.

Fixed some flapping tests.
2016-04-21 11:48:39 -06:00
Ivan Kozlovic
3aa09ecc01 Ensure Shutdown() waits for outstanding routes go routines
We need to make sure that when Shutdown() returns, routes go routines
that try to connect or reconnect have returned. Otherwise, this may
affect tests running one after the other (a server from one test
may connect to a server in the next test).
2016-04-21 11:48:39 -06:00
Derek Collison
5bea74c2ed Rename and move some things around 2016-04-21 09:33:26 -07:00
Derek Collison
6004a4e528 Update copyright 2016-04-18 20:31:56 -07:00
Derek Collison
34a75bbe15 Merge pull request #249 from nats-io/win-pse
Windows procUsage implementation and test
2016-04-18 20:30:46 -07:00
Derek Collison
f60119d332 Add in auto release builds, matrix and coverage for only one run 2016-04-18 20:00:02 -07:00
Colin Sullivan
b40cb9704d Use Argv[0] to get process ID, test updates, increase coverage. 2016-04-18 15:40:00 -06:00
Colin Sullivan
be6416c832 Windows PS Emulation and Test 2016-04-18 10:09:00 -06:00
Derek Collison
0cb85b18ec remove need for atomic 2016-04-15 18:32:19 -07:00
Derek Collison
b3388db53f Enable dynamic write buffers for client connections 2016-04-15 18:16:13 -07:00
Derek Collison
4f333416bb Revert race on interest graph since it could cause dropped interest propogation, fix test instead 2016-04-15 15:46:29 -07:00
Derek Collison
3e2c3714bc Fix race in interest propogation to new routes 2016-04-15 13:16:13 -07:00
Derek Collison
433d62ec0a Parse IPs and raw strings in arrays properly 2016-04-07 08:36:57 -07:00
Justin Nuß
e4d111fa0a Remove allocation when inserting into sublist 2016-04-06 14:15:26 +02:00
Justin Nuß
4bf0b47e74 Remove unnecessary string allocation 2016-04-05 15:25:55 +02:00
Derek Collison
0bb362601e Revert back to ps callout.
Going back to ps callout on MacOSX to avoid cgo for pending
changes to release process.
2016-04-04 18:50:13 -07:00
Derek Collison
6ce89066fb race fix 2016-04-03 14:40:45 -07:00
Derek Collison
768f23b5b4 dynamic read buffers 2016-04-03 14:30:17 -07:00
Derek Collison
96d9ce5048 Queue subscriber performance
Reworked sublist to sort out normal subscribers from queue subscribers into
a result set that can be cached and easily iterated over.
2016-04-03 13:04:06 -07:00
Derek Collison
d0a9a47ea3 L1 client cache for sublist and accounting optimizations 2016-04-03 05:41:45 -07:00
Derek Collison
df02bc0bcf Removed sublist, hash and hashmap, no longer needed. 2016-04-02 12:52:48 -07:00
Derek Collison
f23f55518c gosimple fixes 2016-03-31 07:28:40 -07:00
Ivan Kozlovic
76324844a9 Fixed handling of unprompted PONG protocols
- The number of outstanding PINGs is now reset whenever the server
receives a PONG from the client.
- Updated parser test to check c.pout.
- Added a test to check for unprompted PONGs.

Resolves issue: https://github.com/nats-io/gnatsd/issues/168
2016-03-23 14:30:44 -07:00
Derek Collison
3dd490a449 Go Report Card fixes 2016-03-20 16:06:28 -10:00
Derek Collison
50a14ac1d5 Modified debug and server id 2016-03-20 15:57:43 -10:00
Colin Sullivan
2baac47820 Address issues found by golint.
* No functional changes
* Did not address the ALL_CAPS issues
* Did not modify public APIs and field names.
2016-03-15 15:21:13 -06:00
Ivan Kozlovic
6263c66a40 Fixed code and tests to run on Windows
Mainly tests, but also a fix in route.go to reject a route when the
server is being shutdown.
2016-03-07 18:47:20 -07:00