Commit Graph

41 Commits

Author SHA1 Message Date
Ivan Kozlovic
0a4f2e642e Fixed code coverage GithHub Action
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2023-10-09 13:07:54 -06:00
Sylvain Rabot
a6f7f5476e Bump v2.9 CI and nightlies to Go 1.20
Signed-off-by: Waldemar Quevedo <wally@nats.io>
2023-09-04 11:43:22 -07:00
Neil Twigg
14d0ba1c65 Fix some lint errors after move to golangci-lint 2022-12-30 20:00:08 +00:00
Neil Twigg
7042fc1638 Switch to golangci-lint 2022-12-30 19:46:50 +00:00
Ivan Kozlovic
3fadccab38 Move new test to new jetstream_cluster_3_test.go file
Since the second batch was already past the 5min mark and a bit
longer than the first batch, it is a good opportunity to add
this new test in a new file. Updated runTestsOnTravis and travis.yml
accordingly.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-15 12:13:00 -06:00
Ivan Kozlovic
29224c8ea9 Split more tests to speed up Travis run
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-09 12:45:48 -06:00
Ivan Kozlovic
e851fdb66b Increase test timeout for nightly code coverage
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-08-24 14:38:34 -06:00
Marco Primi
be460b7bf1 Exclude chaos tests from build by default
Before: build chaos tests unless `skip_js_chaos_tests` is set
After: exclude chaos tests unless `js_chaos_tests` is set
2022-08-05 15:20:09 -07:00
Marco Primi
896adace06 [FIXED] Wrong flag in Travis to exclude chaos tests
The `js_tests` build target was using the wrong tag to exclude chaos 
tests.
As a result, chaos tests would run as part of the default testing.
2022-08-05 15:20:09 -07:00
Marco Primi
d83e0e2b25 Add 'chaos' test utility and 2 example tests
'Chaos' is a new a group of test that validates behavior in presence of
random failures.

Overview:
 - Introduce a 'Chaos Monkey' controller which can unleash a monkey
against a test cluster.
 - Introduce a monkey of type 'ClusterBouncer' which stops and restarts
nodes according to some configuration
 - Add 2 example tests, they ensure a cluster can survive some amount of
nodes bouncing
 - Configure the build to skip chaos tests unless explicitly requested
 - Add some test utility functions
2022-08-03 14:01:56 -07:00
Ivan Kozlovic
427e52dba2 Removed export GODEBUG="x509sha1=1" from runTestsOnTravis.sh
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-07-28 09:19:57 -06:00
Derek Collison
b0580cdfc2 Fix some spellings
Signed-off-by: Derek Collison <derek@nats.io>
2022-06-28 18:45:33 -07:00
Derek Collison
a7bb479339 For older versions just check we did not break build step
Signed-off-by: Derek Collison <derek@nats.io>
2022-06-24 10:54:02 -07:00
Derek Collison
4de1766f40 Fix TLS tests and allow older test certs for now
Signed-off-by: Derek Collison <derek@nats.io>
2022-06-24 09:43:42 -07:00
Derek Collison
cc197771ec Allow compile and staticheck to pass.
Signed-off-by: Derek Collison <derek@nats.io>
2022-06-24 09:17:12 -07:00
Ivan Kozlovic
92755d3329 Fixed GithubAction code coverage to handle test panics
We are ok with a flapper or two, because they should not affect
code coverage that much, so it is better to have those and publish
code coverage than to have to recycle the whole test suite until
we get no test failure.

However, if there is a test panic, then all other tests within this
package will NOT run, which then would have possibly a massive
impact in the code coverage percentage.

These changes will ensure that the run fails if one of the code
coverage output is "empty" (it is actually not empty, but the
initial content is "mode: atomic" and then whe code coverage is
complete, it gets filled with actual code coverage data).
On failure, the push to coverall will not happen.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-05-02 14:51:19 -06:00
Ivan Kozlovic
0e2ab5eeea Changes to tests that run on Travis
- Remove code coverage from Travis and add it to a GitHub Action
that will be run as a nightly.
- Use tag builds to exclude some tests, such as the "norace" or
JS tests. Since "go test" does not support "negative" regexs, there
is no other way.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-26 14:11:31 -06:00
Ivan Kozlovic
59eef192cd Prepare for release v2.7.0, start with v2.7.0-rc1
Since we have never released with goreleaser and GO111MODULE=on
and have removed vendor directory, we are going to push a
v2.7.0-rc1 tag. If the goreleaser process works fine and submit
the draft release correctly, we will not do an actual v2.7.0-rc1
release. Instead, we will follow up immediately with the v2.7.0
tag and the proper release.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-01-13 16:15:51 -07:00
Ivan Kozlovic
cd78d6b3d7 Remove TestNoRace tests from code coverage
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-11-17 18:25:58 -07:00
Ivan Kozlovic
d760f2edc8 Bump tests code coverage timeout
Default of 10 minute (per package) seem to no longer be enough,
so bumping to 20 minutes, as it is on non code coverage runs.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-11-17 15:56:07 -07:00
Ivan Kozlovic
d154d646d4 Run coverage, but push to coverall only after_success
This will ensure that we get the matrix run green before pushing
results to coveralls, but also that if for some reason coveralls
has a problem, this is not making our build status red.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-09-20 12:02:14 -06:00
Ivan Kozlovic
07e3db6b8e Prepare for v2.0.4 with goreleaser
Also fixed some flappers

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-08-15 09:06:56 -06:00
Derek Collison
acfe372d63 Changes for rename from gnatsd -> nats-server
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-06 15:04:24 -07:00
Ivan Kozlovic
04d824c4d4 [FIXED] Possible slow consumers when routes exchange sub list
If each server has a long list of subscriptions, when the route
is established, sending this list could result in each server
treating the peer as a slow consumer, resulting in a reconnect,
etc..
Also bumping the fan-in threshold for route connections.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-02-20 12:09:26 -08:00
Ivan Kozlovic
049675088d [ADDED] ARM64v8 Release build
- Add linux/arm64 to cross compile script
- Update .travis.yml to push builds on Go 1.8.x version
- Update Dockerfile to Go 1.8.3
- Change Dockerfile.win64 to actually build all the builds that
  we would want to provide a Docker image for
2017-08-25 09:20:31 -06:00
Ivan Kozlovic
9d932b9c6a Replaced ARMv5 with ARMv6 in cross_compile
Related to #527
2017-07-06 17:07:58 -06:00
Ivan Kozlovic
aa36f37ff4 [ADDED] Build for ARMv7
The cross compile script compiled an ARM executable, but the ARM
default version varies based on the host, etc..
Made a change to the cross compile script to explicitly compile
ARMv5 and ARMv7.
2017-07-06 09:00:29 -06:00
Tyler Treat
2d324e6e31 Return non-zero exit code on failure 2017-06-07 09:44:49 -05:00
Ivan Kozlovic
aac1e74eb8 Fix code coverage script (remove auth package that no longer exists) 2017-04-27 09:19:01 -06:00
Ivan Kozlovic
67a4a37616 [FIXED] Release on linux amd64 is the only one dynamically linked
We are using the tool from https://github.com/mitchellh/gox
for cross compilation. When we issue a new release, we create a
tag and trigger Travis build which will then invoke the script and
upload the files to GH.

We were affected by https://github.com/mitchellh/gox/issues/55

Invoking the script on a Linux amd64 would produce this:

file pkg/gnatsd-linux-amd64/gnatsd
pkg/gnatsd-linux-amd64/gnatsd: ELF 64-bit LSB executable, x86-64,
version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, stripped

With the fix, you'll get this:

file pkg/gnatsd-linux-amd64/gnatsd
pkg/gnatsd-linux-amd64/gnatsd: ELF 64-bit LSB executable, x86-64,
version 1 (SYSV), statically linked, stripped

Resolves #470
2017-04-07 12:51:59 -06:00
Ivan Kozlovic
a0245fc0c8 [FIXED] Server not sending PINGs to TSL connections (clients or routes)
- Removed unnecessary cast check to (*net.TCPConn). When the timer
fires, the connection is already established. Replaced with check
that connection has not been closed.
- Add PING test that checks that pings are sent to TLS connections.
- Changed Go version to 1.7.5 in travis.
- Removed test package from code coverage.
2017-03-24 09:49:42 -06:00
Derek Collison
06cc95ac54 don't version the binary 2016-04-25 15:22:36 -07: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
Derek Collison
93e0b749f6 Allow tagged release names 2016-04-18 20:00:21 -07:00
Derek Collison
7761ecd740 Added darwin, updated to Go1.6 2016-04-04 19:01:18 -07:00
Derek Collison
113c0a9173 Merge pull request #200 from zquestz/cross_compile
Added travis cross compilation support for linux/solaris/windows
2016-04-04 18:52:22 -07:00
Derek Collison
df02bc0bcf Removed sublist, hash and hashmap, no longer needed. 2016-04-02 12:52:48 -07:00
quest
6e754af487 Remove mousetrap 2016-02-08 18:40:05 -08:00
quest
3b504d5109 Added travis cross compilation support for linux/solaris/windows 2016-02-08 16:28:25 -08:00
Derek Collison
468c6af6f5 Remove unused scripts 2016-01-17 10:01:47 -08:00
Derek Collison
a28ce73281 Better coverage support 2016-01-17 09:57:11 -08:00