Commit Graph

76 Commits

Author SHA1 Message Date
Yasuo Honda
aa026ee105 Revert "Work around getaddrinfo deadlock in forked process"
This reverts commit 7cf8e30902119b22c5f9fa1f4d80185ba3f3a5f7.
2020-12-06 23:01:56 +09:00
Yasuo Honda
8ae1738a14 Revert "Merge pull request #40451 from yahonda/sneakers"
This reverts commit 3b9807f3de9d4231cb914946f53f164fbd6d0b7a, reversing
changes made to 7e2d8434ed42d6fbf7f4743d033d50ad92ebe4da.
2020-12-06 23:01:41 +09:00
Yasuo Honda
fa3d47018b Revert "Merge pull request #40453 from yahonda/resque_start_workers"
This reverts commit 1fddc8023ec1e7f65e9b0c299ade1084dc7a3bf4, reversing
changes made to 1f5a4d1d5e68106eaa897e49a874bef24bf4c63c.
2020-12-06 23:01:19 +09:00
Yasuo Honda
a0561d746d Workaround Active Job integration test with resque against ruby 3.0.0dev
This pull request workarounds Active Job integration test with `resque` reported at https://buildkite.com/rails/rails/builds/72277#410533b8-0676-4ad2-900f-fa8131f9833f/1826
This fix is similar to 7cf8e30 and rails/rails#40451 which is due to https://bugs.ruby-lang.org/issues/17220

- Steps to reproduce

```
- Install Docker
$ git clone https://github.com/rails/rails
$ cd rails
$ git clone https://github.com/rails/buildkite-config .buildkite/
$ RUBY_IMAGE=rubylang/ruby:master-nightly-bionic docker-compose -f .buildkite/docker-compose.yml build base && CI=1 docker-compose -f .buildkite/docker-compose.yml run activejob runner activejob 'AJ_ADAPTER=resque AJ_INTEGRATION_TESTS=true bin/test test/integration/queuing_test.rb  --seed 36344'
```

- Without this commit

```
$ RUBY_IMAGE=rubylang/ruby:master-nightly-bionic docker-compose -f .buildkite/docker-compose.yml build base && CI=1 docker-compose -f .buildkite/docker-compose.yml run activejob runner activejob 'AJ_ADAPTER=resque AJ_INTEGRATION_TESTS=true bin/test test/integration/queuing_test.rb  --seed 36344'
... snip ...
+++ activejob: AJ_ADAPTER=resque AJ_INTEGRATION_TESTS=true bin/test test/integration/queuing_test.rb  --seed 36344
Using resque
/usr/local/lib/ruby/gems/3.0.0/gems/resque-scheduler-4.4.0/lib/resque/scheduler/lock/base.rb:50: warning: Socket.gethostbyname is deprecated; use Addrinfo.getaddrinfo instead.
Run options: --seed 36344

.F

Failure:
QueuingTest#test_should_run_jobs_enqueued_on_a_listening_queue [/rails/activejob/test/integration/queuing_test.rb:14]:
Expected false to be truthy.

bin/test test/integration/queuing_test.rb:11

F

Failure:
QueuingTest#test_current_timezone_is_kept_while_running_perform_later [/rails/activejob/test/integration/queuing_test.rb:119]:
Expected false to be truthy.

bin/test test/integration/queuing_test.rb:110

.SSF

Failure:
QueuingTest#test_current_locale_is_kept_while_running_perform_later [/rails/activejob/test/integration/queuing_test.rb:102]:
Expected false to be truthy.

bin/test test/integration/queuing_test.rb:93

.F

Failure:
QueuingTest#test_should_run_job_enqueued_in_the_future_at_the_specified_time [/rails/activejob/test/integration/queuing_test.rb:76]:
Expected false to be truthy.

bin/test test/integration/queuing_test.rb:71

SSSSSS

Finished in 34.122641s, 0.4396 runs/s, 0.2344 assertions/s.
15 runs, 8 assertions, 4 failures, 0 errors, 8 skips

You have skipped tests. Run with --verbose for details.
$
```

- With this commit

```ruby
$ RUBY_IMAGE=rubylang/ruby:master-nightly-bionic docker-compose -f .buildkite/docker-compose.yml build base && CI=1 docker-compose -f .buildkite/docker-compose.yml run activejob runner activejob 'AJ_ADAPTER=resque AJ_INTEGRATION_TESTS=true bin/test test/integration/queuing_test.rb  --seed 36344'
... snip ...
+++ activejob: AJ_ADAPTER=resque AJ_INTEGRATION_TESTS=true bin/test test/integration/queuing_test.rb  --seed 36344
Using resque
/usr/local/lib/ruby/gems/3.0.0/gems/resque-scheduler-4.4.0/lib/resque/scheduler/lock/base.rb:50: warning: Socket.gethostbyname is deprecated; use Addrinfo.getaddrinfo instead.
Run options: --seed 36344

....SS...SSSSSS

Finished in 13.850658s, 1.0830 runs/s, 0.7220 assertions/s.
15 runs, 10 assertions, 0 failures, 0 errors, 8 skips

You have skipped tests. Run with --verbose for details.
$
```
2020-10-25 23:50:55 +09:00
Yasuo Honda
9f4818c55f Address Active Job integration test with sneakers against ruby 3.0.0dev
This pull request addresses Active Job integration test with `sneakers` reported at https://buildkite.com/rails/rails/builds/72257#20014e66-6e08-47ae-a827-b71de7148306/2017
This fix is similar to 7cf8e30902 which is due to https://bugs.ruby-lang.org/issues/17220

- Steps to reproduce
Install ruby 3.0.0dev using ruby-build or whatever then execute these steps.

```ruby
$ git clone https://github.com/rails/rails
$ cd rails/activejob
$ bundle install
$ bundle exec rake test:integration:sneakers
```

- Result without this commit

```ruby
$ ruby -v
ruby 3.0.0dev (2020-10-24T13:53:53Z master 148961adcd) [x86_64-linux]
$ cd activejob
$ bundle exec rake test:integration:sneakers
... snip ...
/home/yahonda/src/github.com/rails/rails/activejob/test/support/integration/adapters/sneakers.rb:49:in `rescue in start_workers': Failed to start sneakers worker (RuntimeError)
	from /home/yahonda/src/github.com/rails/rails/activejob/test/support/integration/adapters/sneakers.rb:41:in `start_workers'
	from /home/yahonda/src/github.com/rails/rails/activejob/test/support/integration/helper.rb:27:in `<top (required)>'
	from /home/yahonda/src/github.com/rails/rails/activejob/test/helper.rb:12:in `require'
	from /home/yahonda/src/github.com/rails/rails/activejob/test/helper.rb:12:in `<top (required)>'
	from /home/yahonda/src/github.com/rails/rails/activejob/test/integration/queuing_test.rb:3:in `require'
	from /home/yahonda/src/github.com/rails/rails/activejob/test/integration/queuing_test.rb:3:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.0.0-dev/lib/ruby/gems/3.0.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:17:in `require'
	from /home/yahonda/.rbenv/versions/3.0.0-dev/lib/ruby/gems/3.0.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:17:in `block in <main>'
	from /home/yahonda/.rbenv/versions/3.0.0-dev/lib/ruby/gems/3.0.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:5:in `select'
	from /home/yahonda/.rbenv/versions/3.0.0-dev/lib/ruby/gems/3.0.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:5:in `<main>'
/home/yahonda/src/github.com/rails/rails/activejob/test/support/integration/adapters/sneakers.rb:44:in `sleep': execution expired (Timeout::Error)
	from /home/yahonda/src/github.com/rails/rails/activejob/test/support/integration/adapters/sneakers.rb:44:in `block in start_workers'
	from /home/yahonda/.rbenv/versions/3.0.0-dev/lib/ruby/3.0.0/timeout.rb:112:in `timeout'
	from /home/yahonda/src/github.com/rails/rails/activejob/test/support/integration/adapters/sneakers.rb:42:in `start_workers'
	from /home/yahonda/src/github.com/rails/rails/activejob/test/support/integration/helper.rb:27:in `<top (required)>'
	from /home/yahonda/src/github.com/rails/rails/activejob/test/helper.rb:12:in `require'
	from /home/yahonda/src/github.com/rails/rails/activejob/test/helper.rb:12:in `<top (required)>'
	from /home/yahonda/src/github.com/rails/rails/activejob/test/integration/queuing_test.rb:3:in `require'
	from /home/yahonda/src/github.com/rails/rails/activejob/test/integration/queuing_test.rb:3:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.0.0-dev/lib/ruby/gems/3.0.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:17:in `require'
	from /home/yahonda/.rbenv/versions/3.0.0-dev/lib/ruby/gems/3.0.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:17:in `block in <main>'
	from /home/yahonda/.rbenv/versions/3.0.0-dev/lib/ruby/gems/3.0.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:5:in `select'
	from /home/yahonda/.rbenv/versions/3.0.0-dev/lib/ruby/gems/3.0.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:5:in `<main>'
rake aborted!
Command failed with status (1): [ruby -w -I"lib:test" -I"/home/yahonda/.rbenv/versions/3.0.0-dev/lib/ruby/gems/3.0.0/gems/rake-13.0.1/lib" "/home/yahonda/.rbenv/versions/3.0.0-dev/lib/ruby/gems/3.0.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb" "test/integration/queuing_test.rb" ]
/home/yahonda/.rbenv/versions/3.0.0-dev/bin/bundle:23:in `load'
/home/yahonda/.rbenv/versions/3.0.0-dev/bin/bundle:23:in `<main>'
Tasks: TOP => test:integration:sneakers
(See full trace by running task with --trace)
$
```

- Result with this commit

```ruby
$ bundle exec rake test:integration:sneakers
... snip ...
15 runs, 6 assertions, 0 failures, 0 errors, 11 skips
```
2020-10-25 15:13:38 +09:00
Eugene Kenny
7cf8e30902 Work around getaddrinfo deadlock in forked process
See https://bugs.ruby-lang.org/issues/17220.

This will prevent every CI run from getting stuck and eventually timing
out after 30 minutes.
2020-10-16 01:00:12 +01:00
Wojciech Wnętrzak
d12a31b193
Add support for que name to Que adapter.
Co-authored-by: Brad Nauta <bradnauta@gmail.com>
2020-03-04 13:50:13 +01:00
Matthew Draper
7437b6a361 Tidy up the build output for Active Job adapters 2019-10-23 20:47:50 +10:30
Eugene Kenny
5545f6a771 Fix Active Job Sidekiq integration tests
The `Sidekiq::Logging` module was removed in Sidekiq 6.0 in favour of
`Sidekiq.logger=`.

https://github.com/mperham/sidekiq/wiki/Logging#api-changes

> The old Sidekiq::Logging class was removed in Sidekiq 6.0. You should
> not be accessing any Sidekiq internal classes to use the logger. Use
> `logger` directly in your Worker or use `Sidekiq.logger` elsewhere.
2019-09-01 23:31:21 +02:00
Akira Matsuda
af2129b4c7 Use try only when we're unsure if the receiver would respond_to the method 2019-08-01 17:58:00 +09:00
Ryuta Kamizono
c81af6ae72 Enable Layout/EmptyLinesAroundAccessModifier cop
We sometimes say "✂️ newline after `private`" in a code review (e.g.
https://github.com/rails/rails/pull/18546#discussion_r23188776,
https://github.com/rails/rails/pull/34832#discussion_r244847195).

Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style
`EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059).

That cop and enforced style will reduce the our code review cost.
2019-06-13 12:00:45 +09:00
Matthew Draper
287920ca7d Respect ENV variables when finding DBs etc for the test suite
If they're not set we'll still fall back to localhost, but this makes it
possible to run the tests against a remote Postgres / Redis / whatever.
2019-02-06 01:20:06 +10:30
Ryuta Kamizono
892e38c78e Enable Style/RedundantBegin cop to avoid newly adding redundant begin block
Currently we sometimes find a redundant begin block in code review
(e.g. https://github.com/rails/rails/pull/33604#discussion_r209784205).

I'd like to enable `Style/RedundantBegin` cop to avoid that, since
rescue/else/ensure are allowed inside do/end blocks in Ruby 2.5
(https://bugs.ruby-lang.org/issues/12906), so we'd probably meets with
that situation than before.
2018-12-21 06:12:42 +09:00
yuuji.yaginuma
7eba11373c Remove an extra @mutex.synchronize
Since `@mutex.synchronize` is enforced in the `ensure_connection!` method,
there is no need to do so on the caller side.
c1b47f9c5d/lib/sneakers/publisher.rb (L22-L26)

Due to this, `ThreadError(deadlock; recursive locking)` has occurred.
2018-10-19 12:38:21 +09:00
yuuji.yaginuma
096cb88ce7 Return a non zero code when can not connect to backend on CI 2018-10-19 07:45:47 +09:00
J Smith
69e0e0acf9 Ignore psqlrc files when executing psql commands
psqlrc files can affect the execution of commands in ways that can hold
up execution by blocking or otherwise cause unexpected side effects and
should best be ignored when using psql programmatically.
2018-09-17 12:13:42 -03:00
bogdanvlviv
237ef95338
Print correct rake command on running AJ integration tests
Currently when executing `bundle exec rake test:integration` under `activejob/`
derectory, it prints helpful info like:
```
(snip)
*** rake aj:integration:async ***
(snip)
*** rake aj:integration:delayed_job ***
(snip)
 ```
but  there is no defined `:aj` scope  in `activejob/Rakefile`,
so I think output should be like:
```
(snip)
*** rake test:integration:async ***
(snip)
*** rake test:integration:delayed_job ***
(snip)
 ```

By the way `rake test:integration` doesn't work if execute it without
prepending `bundle exec` to that command. It is probably what we should
fix too.
2018-09-17 08:19:12 +03:00
Alberto Almagro
6ef720791d Remove support for Qu gem.
Reasons are that the Qu gem wasn't compatible since Rails 5.1,
gem development was stopped in 2014 and maintainers have
confirmed its demise. See issue #32273
2018-03-19 21:27:16 +01:00
Andrew White
a9d1167b1f Add support for timezones to Active Job
Record what was the current timezone in effect when the job was
enqueued and then restore when the job is executed in same way
that the current locale is recorded and restored.
2018-02-22 14:14:42 +00:00
yuuji.yaginuma
ce98cd0d0d Explicitly require sidekiq/cli
Currently, sidekiq integration test + Ruby 2.5.0-rc1 show exception as follows.

```
#<Thread:0x000000000670bec0@/home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.0.5/lib/sidekiq/util.rb:23 run> terminated with exception (report_on_exception is true):
/home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.1.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:53:in `block in load_missing_constant': uninitialized constant Sidekiq::CLI (NameError)
	from /home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.1.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in `without_bootsnap_cache'
	from /home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.1.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:53:in `rescue in load_missing_constant'
	from /home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.1.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:42:in `load_missing_constant'
	from /home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.0.5/lib/sidekiq/launcher.rb:65:in `heartbeat'
	from /home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.0.5/lib/sidekiq/launcher.rb:123:in `start_heartbeat'
```

https://travis-ci.org/rails/rails/jobs/317187279#L2152

The reason for this is that `Sidekiq::CLI` has not been loaded.
Sidekiq integration test launches a Sidekiq instance within
another Ruby process. In such a case, need to require 'sidekiq/cli'
in that launch code.

Ref: https://github.com/mperham/sidekiq/pull/3692#issuecomment-352032251
2017-12-16 11:02:26 +09:00
yuuji.yaginuma
8e964556e7 Make sidekiq and resque integration tests work in CI
Since 8f2490b, the integration test of sidekiq and resque is not working
in CI.
https://travis-ci.org/rails/rails/jobs/301276197#L2055
https://travis-ci.org/rails/rails/jobs/301276197#L2061

Because 8f2490b removed password from `redis-server`.
So must also remove passwords from these tests.
2017-11-13 21:02:40 +09:00
yuuji.yaginuma
1ecdd7e8a7 Return a non zero code when can not connect to redis in CI 2017-11-13 21:02:33 +09:00
bogdanvlviv
0835527d6b
rails new runs rails active_storage:install
Omit `rails activestorage:install` for jdbcmysql, jdbc and shebang tests

AppGeneratorTest#test_config_jdbcmysql_database

  rails aborted!
  LoadError: Could not load 'active_record/connection_adapters/mysql_adapter'.
  Make sure that the adapter in config/database.yml is valid.
  If you use an adapter other than 'mysql2', 'postgresql' or 'sqlite3' add
  the necessary adapter gem to the Gemfile.
  (compressed)
  bin/rails:4:in `<main>'
  Tasks: TOP => activestorage:install => environment
  (See full trace by running task with --trace)

AppGeneratorTest#test_config_jdbc_database

  rails aborted!
  LoadError: Could not load 'active_record/connection_adapters/jdbc_adapter'.
  Make sure that the adapter in config/database.yml is valid.
  If you use an adapter other than 'mysql2', 'postgresql' or 'sqlite3' add
  the necessary adapter gem to the Gemfile.
  (compressed)
  bin/rails:4:in `<main>'
  Tasks: TOP => activestorage:install => environment
  (See full trace by running task with --trace)

AppGeneratorTest#test_shebang_is_added_to_rails_file

  /home/ubuntu/.rbenv/versions/2.4.1/bin/ruby: no Ruby script found in input (LoadError)

Prevent PendingMigrationError in tests

 * Run `bin/rails db:migrate RAILS_ENV=test` in test_cases before start tests to prevent PendingMigrationError
 * FileUtils.rm_r("db/migrate")
 * --skip-active-storage

Fix failed tests in `railties/test/railties/engine_test.rb`

Related to #30111

Imporve `SharedGeneratorTests#test_default_frameworks_are_required_when_others_are_removed`

 - Explicitly skip active_storage
 - Ensure that skipped frameworks are commented
 - Ensure that default frameworks are not commented

Fix error `Errno::ENOSPC: No space left on device - sendfile`

Since `rails new` runs `rails active_storage:install`
that boots an app.

Since adding Bootsnap 0312a5c67e35b960e33677b5358c539f1047e4e1
during booting an app, it creates the cache:

   264K    tmp/cache/bootsnap-load-path-cache
   27M     tmp/cache/bootsnap-compile-cache

* teardown_app must remove app
2017-11-06 21:29:14 +00:00
Jeremy Daer
53c516d88d
redis-rb 4.0 support
* Use `gem 'redis', '~> 4.0'` for new app Gemfiles
* Loosen Action Cable redis-rb dep to `>= 3.3, < 5`
* Bump redis-namespace for looser Redis version dep
* Avoid using the underlying `redis.client` directly
* Use `Redis.new` instead of `Redis.connect`
2017-10-08 15:37:54 -07:00
yuuji.yaginuma
0868cac0ef Use ActiveJob::Base.queue_adapter_name to get adapter name
Since 673606a, it holds adapter name.
2017-08-17 06:55:55 +09:00
Matthew Draper
788f46d486 Wait for the Delayed Job worker thread to finish 2017-08-13 22:03:40 +09:30
Kazuhiro NISHIYAMA
7f89d4e8bf Use File::NULL instead of "/dev/null" 2017-07-31 21:58:42 +09:00
Koichi ITO
aa28c5ca65 [Active Job] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
yuuji.yaginuma
46725b33a9 Make sidekiq and resque integration tests work in CI
Since f55ecc6, the integration test of sidekiq and resque is not working
in CI.
https://travis-ci.org/rails/rails/jobs/251783876

Because f55ecc6 required a password to access redis.
Therefore, handling by passing passwords when connecting to redis.
2017-07-10 07:42:17 +09:00
Kir Shatrov
14ece5e429 Use frozen-string-literal in ActiveJob 2017-07-09 20:50:52 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
bogdanvlviv
40bdbce191
Define path with __dir__
".. with __dir__ we can restore order in the Universe." - by @fxn

Related to 5b8738c2df003a96f0e490c43559747618d10f5f
2017-05-23 00:53:51 +03:00
yuuji.yaginuma
acd4840c2a make backburner integration test to work
Currently, backburner integration test is not running on CI.
https://travis-ci.org/rails/rails/jobs/196005322#L610

Using `Backburner::Worker.connection` to check whether beanstalkd is
running. But `Backburner::Worker.connection` was removed in backburner
1.2.0.
81fde499c2

Therefore, this check process always becomes false, so the test is no
longer done. I fixed it so that check processing is done correctly.
2017-01-28 11:34:28 +09:00
Akira Matsuda
7269d9de6a Privatize unneededly protected methods in Active Job tests 2016-12-24 00:15:18 +09:00
Matthew Draper
0e97cd1a0d Avoid race condition in AJ integration tests
Make sure the file doesn't exist until we've finished writing it.
2016-11-30 21:10:52 +10:30
Rafael Mendonça França
fe1f4b2ad5
Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
Xavier Noria
7506f33906 removes requires already present in active_support/rails 2016-10-27 09:45:20 +02:00
Ryuta Kamizono
762e3f05f3 Add Style/EmptyLines in .rubocop.yml and remove extra empty lines 2016-08-07 17:50:59 +09:00
Xavier Noria
b326e82dc0 applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
Xavier Noria
80e66cc4d9 normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
Xavier Noria
411ccbdab2 remove redundant curlies from hash arguments 2016-08-06 19:44:11 +02:00
Xavier Noria
301ce2a6d1 modernizes hash syntax in activejob 2016-08-06 19:36:54 +02:00
Xavier Noria
bde6547bb6 applies new string literal convention in activejob/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:41:18 +02:00
lvl0nax
517cf249c3
Chomp: prefer String#chomp where we can for a clarity boost
Closes #24766, #24767

Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
2016-04-29 13:43:15 -07:00
Jeremy Daer
75097933e2 Merge pull request #23966 from jeremy/activejob/pare-down-async-adapter-for-low-footprint-dev
Active Job: pare down async adapter for low footprint dev
2016-03-01 00:19:20 -07:00
Jeremy Daer
a66780bfff Active Job: smaller footprint for the dev/test async adapter
Use one shared worker pool for all queues with 0-#CPU workers rather
than separate pools per queue with 2-10*#CPU workers each.
2016-02-29 15:58:26 -07:00
Mohit Natoo
dec21eb5f6 - Updating the dummy app template to have rails_command instead of rake 2016-03-01 02:39:43 +05:30
Rafael Mendonça França
2c131141ca Remove celluloid from the Gemfile 2016-01-27 15:44:26 -05:00
Will Jessop
171e788ccd Fix race condition testing for job execution order
On most filesystems file ctime is limited to 1 second granularity, which means that on
faster computers multiple simple jobs (for instance dummy TestJob) can finish within the
same second.

The execution order test in ActiveJob integration tests relies on multiple TestJobs
writing files then comparing the ctime. As a result integration tests would sometimes
fail as the ctime of the files written by these TestJobs could have coincidental ctimes
making the comparison for job order fail.

This commit adds a far more precise execution time (to the extent that the Ruby Time
class allows) to the file created by TestJob, and updates the execution order assertion
to use it, removing the race condition.
2015-11-23 14:24:49 +00:00