Commit Graph

25 Commits

Author SHA1 Message Date
Sam 5881355006 remove uneeded assertion 2017-10-04 15:59:16 +11:00
Sam 4ee2fcd3d5 correct flaky spec 2017-10-04 10:47:24 +11:00
Sam c7532003f3 add more diagnostics for flaky spec 2017-08-23 10:41:57 -04:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Sam ad8643bfe2 attempt to stablise spec in travis 2017-07-25 16:58:19 -04:00
Guo Xiang Tan be3c9bca0b Remove comment that is no longer relevant. 2017-07-25 08:58:40 +09:00
Sam 04eac9f14a lets attempt to get these specs working! 2017-07-24 18:35:20 -04:00
Sam f67e715ef1 comment out specs that break others
will check in a fixed spec tomorrow
2017-07-24 17:28:24 -04:00
Sam c08a7aee8f clean up skipped tests
tighter connection handling in scheduler
2017-07-24 15:06:24 -04:00
Guo Xiang Tan ecb2a0b9c7
Skip tests for now. 2016-06-06 18:18:12 +08:00
Guo Xiang Tan bb92be5784
Clean up Redis after each test. 2016-06-06 17:32:09 +08:00
Sam 3eec0a83b0 clean up stop semantics and bypass test 2016-05-30 13:59:58 +10:00
Sam e11c83341c add more specs 2016-05-30 12:43:01 +10:00
Sam cc088956bc correct some test concurrency bugs 2016-05-30 12:28:05 +10:00
Sam c9dcffe434 FEATURE: store history for scheduled job execution 2016-05-30 11:38:08 +10:00
Andy Waite 3e50313fdc Prepare for separation of RSpec helper files
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`

`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).

For more information:

https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files

In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.

This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.

At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
Sam d6d9a7fa09 FEATURE: per host regular jobs
These are jobs that will run on every host that is running discourse.

If you have multiple hosts running the same site you get independent
schedules
2015-06-26 13:37:05 +10:00
Luciano Sousa 0fd98b56d8 few components with rspec3 syntax 2015-01-09 13:34:37 -03:00
Sam 5c3f2feed4 BUGFIX: recovery code in case an unknown job is scheduled 2014-03-04 07:37:12 +11:00
Sam 71a38542a4 FEATURE: automatic orphan recovery
BUGFIX: improve scheduler robustness, in case redis is disconnected during operation

If sidekiq is terminated while task is running, it will be picked up and ran again
New owner on tasks to help debugging
better #stop semantics for tests
2014-02-12 13:33:24 +11:00
Sam fd34932068 use discourse redis, not redis 2014-02-11 16:11:51 +11:00
Sam 90ae4c6224 Try to fix random failing spec 2014-02-09 07:55:11 +11:00
Sam 585fae0541 another try fixing this test 2014-02-07 14:38:00 +11:00
Sam e1f293ad66 FEATURE: new scheduler
Removed sidetiq, introduced new scheduler

- add basic UI
- add schedule discover
- add scheduling in initializer
2014-02-06 10:26:16 +11:00
Sam ed45a1dce3 FEATURE: new scheduler so we can deprecate sidetiq
This is a work in progress, should have it finished tomorrow.
2014-01-30 16:21:38 +11:00