Currently JS Headers such as `Nats-Expected-Last-Sequence` are case-sensitive
in the server to have a fast path rather and avoid `ReadMIMEHeader`.
In this change, we try to keep the fast path but add another check for cases
when the header may have been sent in a different case than expected.
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
Currently in tests, we have calls to os.Remove and os.RemoveAll where we
don't check the returned error. This hides useful error messages when
tests fail to run, such as "too many open files".
This change checks for more filesystem related errors and calls t.Fatal
if there is an error.
Currently, temporary test files and directories are written in lots of
different paths within the OS's temp dir. This makes it hard to know
which files are from nats-server and which are unrelated. This in turn
makes it hard to clean up nats-server test files.
This also applies to times that end up in that json.
Where applicable moved time.Now() to where it is used.
Moved calls to .UTC() to where time is created it that time is converted
later anyway.
Signed-off-by: Matthias Hanel <mh@synadia.com>
Will keep trying to establish contact.
Fixed bug where double source headers for sourced messages were causing issues.
Signed-off-by: Derek Collison <derek@nats.io>
This avoids a situation where a consumer asks for
ORDERS.new today on a stream of ORDERS.new but later
someone makes the same stream ORDERS.* and the new
consumer would then get messages for other purposes
as well
Signed-off-by: R.I.Pienaar <rip@devco.net>
Add in proper support for stream updates in clustered mode.
Don't send API updates without subjects, caused GW parser errors.
Stream internal loops use their own clients now.
Signed-off-by: Derek Collison <derek@nats.io>