Commit Graph

29 Commits

Author SHA1 Message Date
Ronald 24f91d9077
Add copyright headers for acl, api and bench folders (#16706)
* copyright headers for agent folder

* Ignore test data files

* fix proto files and remove headers in agent/uiserver folder

* ignore deep-copy files

* copyright headers for agent folder

* fix merge conflicts

* copyright headers for agent folder

* Ignore test data files

* fix proto files

* ignore agent/uiserver folder for now

* copyright headers for agent folder

* Add copyright headers for acl, api and bench folders
2023-03-28 16:12:41 -04:00
Daniel Nephin 1cdfc4f290 ci: Enabled SA2002 staticcheck check
And handle errors in the main test goroutine
2020-06-05 17:50:11 -04:00
hashicorp-ci 022483aff0 Merge Consul OSS branch 'master' at commit 95dbb7f2f1b9fc3528a16335201e2324f1b388bd 2019-07-17 02:00:21 +00:00
Freddy 99601aa3a7
Update retries that weren't using retry.R (#6146) 2019-07-16 14:47:45 -06:00
Aestek 24c29e195b kv: do not trigger watches when setting the same value (#5885)
If a KVSet is performed but does not update the entry, do not trigger
watches for this key.
This avoids releasing blocking queries for KV values that did not
actually changed.
2019-06-18 15:06:29 +02:00
Jeff Mitchell d3c7d57209
Move internal/ to sdk/ (#5568)
* Move internal/ to sdk/

* Add a readme to the SDK folder
2019-03-27 08:54:56 -04:00
Jeff Mitchell a41c865059
Convert to Go Modules (#5517)
* First conversion

* Use serf 0.8.2 tag and associated updated deps

* * Move freeport and testutil into internal/

* Make internal/ its own module

* Update imports

* Add replace statements so API and normal Consul code are
self-referencing for ease of development

* Adapt to newer goe/values

* Bump to new cleanhttp

* Fix ban nonprintable chars test

* Update lock bad args test

The error message when the duration cannot be parsed changed in Go 1.12
(ae0c435877d3aacb9af5e706c40f9dddde5d3e67). This updates that test.

* Update another test as well

* Bump travis

* Bump circleci

* Bump go-discover and godo to get rid of launchpad dep

* Bump dockerfile go version

* fix tar command

* Bump go-cleanhttp
2019-03-26 17:04:58 -04:00
Freddy 54e4cd4801 Improve resilience of api pkg tests (#4676)
* Add function to wait for serfHealth in api tests

* Disable connect when creating semaphore test clients

* Wait for serfHealth when creating sessions in their tests

* Add helper functions to create lock/semaphore sessions without checks

* Log passing tests to prevent timeout in Travis due to lack of output
2018-09-18 17:47:01 +01:00
Pierre Souchay 7a42c31330 Fix unstable tests in agent, api, and command/watch 2018-09-10 16:58:53 +01:00
Pierre Souchay fd927ea110 BUGFIX: Unit test relying on WaitForLeader() did not work due to wrong test (#4472)
- Improve resilience of testrpc.WaitForLeader()

- Add additionall retry to CI

- Increase "go test" timeout to 8m

- Add wait for cluster leader to several tests in the agent package

- Add retry to some tests in the api and command packages
2018-08-06 19:46:09 -04:00
Ryan Slade 6f05ea91a3 Replace time.Now().Sub(x) with time.Since(x) 2017-10-17 20:38:24 +02:00
Frank Schroeder 6a1ab1a2e0 api: refactor: unify naming of API tests 2017-07-07 09:22:34 +02:00
Frank Schroeder 97b7578ccd api: refactor: prefix all API tests with API_ 2017-07-07 09:22:34 +02:00
Kyle Havlovitz d5ee327fea More flaky unit test fixes (#2449)
* More flaky unit test fixes
* Raise some test timeouts that were too low
2016-10-31 09:59:20 -07:00
James Phillips 6dd0835319 Makes the timeout behavior more intuitive.
Previously, it would try once "up to" the timeout, but in practice it would
just fall through. This modifies the behavior to block until the timeout has
been reached.
2016-01-06 09:40:20 -08:00
James Phillips 3348cf4c0b Adds "try" support to locks and semaphores. 2016-01-05 18:22:36 -08:00
James Phillips 48f9210761 Adds a unit test for lock monitor retries. 2015-11-30 20:16:40 -08:00
James Phillips e4b89bfa9f Fixes a typo. 2015-10-15 14:59:09 -07:00
James Phillips 32e2439f93 Fixes index management for KVS. 2015-10-15 14:59:09 -07:00
Dale Wijnand c5168e1263 Fix a bunch of typos. 2015-09-15 13:22:08 +01:00
Ryan Uber 234466b412 api: run tests in parallel 2015-05-08 10:27:24 -07:00
Armon Dadgar 9ca81565a5 api: Fixing test compilation issue 2015-05-04 15:27:22 -07:00
Armon Dadgar 63bd33ff0b Merge pull request #861 from fraenkel/reclaim_lock
Reclaim locks
2015-05-04 15:23:29 -07:00
Michael Fraenkel 093b23d0c3 Reclaim locks
- When attempting to lock with the same session that already owns the lock,
  Lock() will re-acquire the lock.
2015-04-29 10:10:24 -07:00
Ryan Uber 0af4bd8b23 testutil: initial pass at moving test server harness into testutil 2015-03-19 17:03:06 -07:00
Armon Dadgar bed066dda9 api: Detect conflicting existing values for lock/semaphore 2015-01-19 15:32:19 -10:00
Armon Dadgar a12883a5be api: Adding Destroy to cleanup a lock 2015-01-13 14:01:50 -08:00
Armon Dadgar 02c2cc6e08 api: Fixing typos 2015-01-09 17:42:24 -08:00
Armon Dadgar 4e66d5407d api: Adding Lock helpers for leader election 2015-01-09 17:35:17 -08:00