aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/support/integration/dummy_app_template.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use `try` only when we're unsure if the receiver would respond_to the methodAkira Matsuda2019-08-011-1/+1
|
* Add support for timezones to Active JobAndrew White2018-02-221-0/+1
| | | | | | 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.
* `rails new` runs `rails active_storage:install`bogdanvlviv2017-11-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [Active Job] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveJobKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Define path with __dir__bogdanvlviv2017-05-231-1/+1
| | | | | | ".. with __dir__ we can restore order in the Universe." - by @fxn Related to 5b8738c2df003a96f0e490c43559747618d10f5f
* Avoid race condition in AJ integration testsMatthew Draper2016-11-301-1/+2
| | | | Make sure the file doesn't exist until we've finished writing it.
* applies new string literal convention in activejob/testXavier Noria2016-08-061-4/+4
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* - Updating the dummy app template to have rails_command instead of rakeMohit Natoo2016-03-011-1/+1
|
* Fix race condition testing for job execution orderWill Jessop2015-11-231-2/+5
| | | | | | | | | | | | | | | 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.
* Run `rake db:migrate` for all Active Job integration testsAndrew White2015-09-211-1/+2
| | | | | | If db/schema.rb doesn't exist then we get warnings from the dummy Rails application so run it for all adapters even if they're not using the database to store jobs.
* Fixes #20799Johannes Opper2015-08-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | When `#perform_later` is called the locale isn't stored on the queue, which results in a locale reset when the job is performed. An example of the problem: I18n.locale = 'de' HelloJob.perform_now # german message, correct but I18n.locale = 'de' HelloJob.perform_later # english message, incorrect This PR attaches the current I18n.locale to every job during the serialization process. It is then restored during deserialization and used to perform the job with the correct locale. It falls back to the default locale if no serialized locale is found in order to provide backward compatibility with previously stored jobs. It is not necessary to clear the queue for the update.
* Changed the AJADAPTER to AJ_ADAPTERJeroen van Baarsen2015-02-221-1/+1
| | | | | | | * This allows for easier reading, since those are two words, so they should be split by _ Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* Make AJ integration tests much less verboseMatthew Draper2014-09-271-1/+1
| | | | In passing, avoid a blind retry in QC: instead, just fix the problem.
* ActiveJob Integration TestsCristian Bica2014-09-111-0/+21