1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
Commit graph

77 commits

Author SHA1 Message Date
Mike Perham
5776c7ae87 standard:fix the testsuite codebase, no functional changes 2022-03-03 12:51:10 -08:00
Peter Goldstein
860c7b1909
Load aliases for Psych 4 (included in Ruby 3.1) () 2022-01-24 13:32:36 -08:00
Sam Bostock
6bef01546b
Make __FILE__ and __dir__ behave as expected in ERB configs ()
* Add tests for existing ERB config __FILE & __dir__

* Allow expected usage of __FILE__ in ERB config
2021-11-15 21:08:27 -08:00
Mike Perham
4a43f598fb Warn louder 2020-12-02 09:29:10 -08:00
Oliver Peate
c4c01f8894
Warn on boot if maxmemory policy is not 'noeviction' () 2020-12-02 08:50:00 -08:00
Mike Perham
fce05c9d4b
Fetch API refactor, WIP ()
* Fetch API refactor, WIP

* save options for later

* changes

* Fix test failures
2020-06-19 08:39:18 -07:00
Manoj M J
26f983b39a
Do not allow to set strict via the config file () 2020-05-07 09:00:19 -07:00
Manoj M J
fe2915ab8b
Fix: Strict ordering must be followed for queues without weights specified by -q ()
Co-authored-by: Mike Perham <mperham@gmail.com>
2020-05-05 13:00:48 -07:00
Manoj M J
316a281d7a
Refactor Sidekiq::CLI to remove a redundant .empty? method call () 2020-05-05 12:57:21 -07:00
Manoj M J
7843815554
Add tests for invalid concurrency and timeout setting () 2020-05-04 09:51:32 -07:00
fatkodima
2ecb6fa00b Print Rails info at startup () 2019-11-17 17:50:01 -08:00
fatkodima
34fe914946 A couple of random small code cleanups 2019-09-26 07:14:11 -07:00
Mike Perham
62c2f04c93 fix test 2019-08-02 11:07:16 -07:00
Mike Perham
653c58f646 merge master 2019-03-01 13:26:21 -08:00
Mike Perham
19c44dd5b1 merge master 2019-02-07 11:42:35 -08:00
Andrew Babichev
a281aa44a6 Consider Default Required Path on Config File Search ()
* Consider default required path on config file search

* Fix bundler at ci
2019-01-08 09:20:59 -08:00
Andrew Babichev
3845832c20 JSON Logger Formatter ()
* Check Config File Existence ()

* Check config file existence

* Eager config file check

* Parse expanded path to default sidekiq.yml config file in Rails app

* Cleanup

* Add minitest-around

* Extract context from formatter

* Add JSON logger formatter

* Adjust job logger to handle elapsed time within context

* Add tid test

* Rename processor logger

* Enforce global state reset in logging tests

* Add warning about upcoming refactoring to Sidekiq::Logging

* Replace around hook with explicit stub inside test

It's implemented with fibers, which means Thread.current returns different values in JRuby.

* Fix typo

* Concise JSON formatter keys

* Add logger_formatter option

* Shift context from array of strings to hash

Allows more flexibly format context in the different formatters.

* Adjust warning message regarding context type change

* Add "Formatter" suffix to classes

* Fix CLI specs

* Replace Sidekiq::Logging with Sidekiq::Logger

* Namespace logger formatters

* Remove rails 4 appraisal
2018-12-28 15:05:51 -08:00
Mike Perham
b294ca3c57 merge master 2018-12-28 10:07:03 -08:00
Andrew Babichev
1d835551f0 Check Config File Existence ()
* Check config file existence

* Eager config file check

* Parse expanded path to default sidekiq.yml config file in Rails app

* Cleanup
2018-12-13 08:30:29 -08:00
Mike Perham
5987a8c352 Remove daemonization, pidfile and logfile options, 2018-12-07 13:41:26 -08:00
Andrew Babichev
ea9b34a953 Add CLI Run Test - Write Pid, System Boot, Print Banner ()
* Add appraisal

* Test CLI run (write pid, system boot, print banner)

* Cleanup test helper

* Set REDIS_URL to use non-default host in test env

* Move mintiest-focus to test bundle group
2018-12-07 08:59:42 -08:00
Andrew Babichev
ddb0c8b3a8 Cleanup CLI ()
* Refactor CLI test

Extracted 3 main parts:
- parse
- run
- signal handling

* Move demonization and pid write from parse to run phase

* Move queues default from validate to setup options phase

* Add pry-byebug gem

* Drop Sidekiq::Test

* Require launcher in CLI

* Remove TODOs
2018-12-03 13:24:37 -08:00
Chad Schroeder
e8227186bb Raise error for duplicate queue names in config, fixes ()
* Raise error for duplicate queue names in config, fixes 

* Add note to change log
2018-08-24 11:35:07 -07:00
Darryl Pogue
280c7f7782 Symbolize all config.yml keys when loading
This ensures that keys in the Yaml file can be specified as either
symbols or strings, but will always be treated as symbols after loading.

It tries to use ActiveSupport's `deep_symbolize_keys!` method if
ActiveSupport is loaded, otherwise falling back to an inline version.

Closes .
2017-12-02 13:37:32 -08:00
Mike Perham
2363cef312 Remove more USR1 references 2017-01-03 15:41:48 -08:00
Mike Perham
6a8e1e0702 Switch default quiet signal to TSTP as it is available on JRuby, fixes () 2017-01-03 15:24:48 -08:00
Mike Perham
b8f7082642 Fix minitest warnings ()
* Fix minitest deprecations, fixes 

* fix jruby

* test against jruby release

* ugh

* bump to 5.0.1

* fix test
2017-01-02 12:06:02 -08:00
Mike Perham
de13425b44 Fix Ruby warnings, thanks for the reminder @nateberkopec 2016-08-30 13:29:03 -07:00
Mike Perham
52828e4212 Tune concurrency via env, fixes 2016-08-01 09:33:12 -07:00
Mike Perham
72fe3289ea Merge branch 'master' into frozen 2016-04-21 13:15:00 -07:00
Chris Kershaw
53c7824d06 Need a logfile to reopen logs 2016-01-29 20:12:27 -05:00
Chris Kershaw
de405cc09b Cleanup 2016-01-18 22:07:02 -05:00
Chris Kershaw
7c090d079e Add assertions for USR1, USR2, and TTIN signals 2016-01-18 22:00:06 -05:00
Chris Kershaw
c71c5196c0 Improve test coverage for handling signals 2016-01-01 11:58:42 -05:00
Mike Perham
2c9f7662fc Freeze all string literals in source, fixes
Tests pass and smoke test works perfectly.
2015-12-31 15:33:35 -08:00
Mike Perham
53e6b9e2df Test suite overhaul
Remove Redis mocking.  Minimize Redis flushing where possible.
2015-09-23 10:56:37 -07:00
Anton Davydov
9318208e2e Fix typo in cli test 2015-08-06 17:04:10 +03:00
Mike Perham
9f772406c4 Remove coveralls, use simplecov, improve coverage 2015-07-10 12:35:02 -07:00
grosser
57a06d00d6 allow every test to be run with just ruby test/xxx_test.rb 2014-12-30 12:54:58 -08:00
Richard Lee
defbd6ac32 Add worker generator test 2014-10-21 22:55:40 +08:00
Jordan Day
381e4ea429 Issue : Don't crash if provided config file is empty.
Don't return result of YAML.load if false

added tests around empty config file

update changelog
2014-08-18 13:56:41 -05:00
Mike Perham
c49e1f9ab7 Fix issues with non-deterministic global test state 2014-05-17 15:55:21 -07:00
Mike Perham
1f870fabbb Refactor CLI#parse so it does not boot Rails or require app code and is therefore safer to test. 2014-05-17 15:12:48 -07:00
Peter M. Goldstein
1379f5093e Address assorted warnings 2014-03-19 17:47:08 -07:00
Sean Doyle
e12bf878fa Replaced class and instance level send
Replaced with `__send__` from std lib

* `send` can now be overridden to be more semantically meaningful
  * `message.send(user_id)` as opposed to `message.send_message(user_id)`
* `__send__` makes it clear that the reflective version is intended
2014-02-14 09:43:34 -05:00
Mike Perham
9867b728c4 Concerted effort to increase test coverage: 86 -> 88% 2014-02-01 15:04:20 -08:00
Douwe Maan
040eda558b Remove support for -q foo,bar and -q foo,3,bar syntax. Use -q foo -q bar and -q foo,3 -q bar instead. 2013-12-25 13:30:20 +01:00
Douwe Maan
7747467cd4 Set strict option correctly when using multiple queue options. 2013-12-23 16:43:10 +01:00
Mike Perham
bdc36e4c3d Remove environment support in .yml, 2013-10-16 19:24:22 -07:00
Mike Perham
babfdc96c5 Backport test suite to Minitest 4 so we can test against Rails 4. 2013-09-22 14:38:33 -07:00