1. 22 2月, 2018 2 次提交
    • E
      Call `YAML.load` correctly · 63d530c5
      eileencodes 提交于
      We should call methods with `.method_name` not `::method_name`. Fix two
      instances of `YAML::load` I found in favor of `YAML.load`.
      63d530c5
    • E
      Delete default configuration · bf0495de
      eileencodes 提交于
      Because of this default configuration we're constantly checking if the
      database exists when looping through configurations. This is unnecessary
      and we should just delete it before we need to loop through
      configurations.
      bf0495de
  2. 19 2月, 2018 1 次提交
  3. 18 2月, 2018 6 次提交
  4. 17 2月, 2018 3 次提交
  5. 16 2月, 2018 1 次提交
    • E
      Add test parallelization to Rails · 26821d9b
      eileencodes 提交于
      Provides both a forked process and threaded parallelization options. To
      use add `parallelize` to your test suite.
      
      Takes a `workers` argument that controls how many times the process
      is forked. For each process a new database will be created suffixed
      with the worker number; test-database-0 and test-database-1
      respectively.
      
      If `ENV["PARALLEL_WORKERS"]` is set the workers argument will be ignored
      and the environment variable will be used instead. This is useful for CI
      environments, or other environments where you may need more workers than
      you do for local testing.
      
      If the number of workers is set to `1` or fewer, the tests will not be
      parallelized.
      
      The default parallelization method is to fork processes. If you'd like to
      use threads instead you can pass `with: :threads` to the `parallelize`
      method. Note the threaded parallelization does not create multiple
      database and will not work with system tests at this time.
      
      parallelize(workers: 2, with: :threads)
      
      The threaded parallelization uses Minitest's parallel exector directly.
      The processes paralleliztion uses a Ruby Drb server.
      
      For parallelization via threads a setup hook and cleanup hook are
      provided.
      
      ```
      class ActiveSupport::TestCase
        parallelize_setup do |worker|
          # setup databases
        end
      
        parallelize_teardown do |worker|
          # cleanup database
        end
      
        parallelize(workers: 2)
      end
      ```
      
      [Eileen M. Uchitelle, Aaron Patterson]
      26821d9b
  6. 15 2月, 2018 2 次提交
  7. 10 2月, 2018 2 次提交
  8. 08 2月, 2018 1 次提交
  9. 07 2月, 2018 2 次提交
  10. 06 2月, 2018 3 次提交
    • R
      Invoke `load_schema` in `_default_attributes` · 06d04bc2
      Ryuta Kamizono 提交于
      Currently `_default_attributes` doesn't work unless `load_schema` is
      called before.
      
      The `MissingAttributeError` is caused by `reload_schema_from_cache` is
      invoked by `serialize`.
      
      I added `load_schema` in `_default_attributes` to `_default_attributes`
      works without any dependency like `attribute_types` etc.
      
      Closes #31905.
      06d04bc2
    • E
      Don't output information on drop if not verbose · 1dfc3a24
      eileencodes 提交于
      Followup to b988ecb9, when I cherry-picked from my parallel testing
      branch I didn't realize `drop` wasn't part of the commit.
      1dfc3a24
    • E
      Add ability to turn off verbose for database tasks · b988ecb9
      eileencodes 提交于
      You could use the `VERBOSE` env var to turn off output for migrations
      tasks but you couldn't use it for other tasks.
      
      This change moves the `verbose?` check to a method so we can also use it
      in create and drop respectively.
      
      tenderlove and I noticed this as part of the ongoing work in parallel
      testing. When the parallel tests boot the app needs to create new
      databases for each worker. The output from these is unnecessary but
      there was previously no way to turn it off. Now if `VERBOSE=false` is
      passes to `bin/rails db:create` the text "Created blah blah db" will no
      longer be output.
      b988ecb9
  11. 04 2月, 2018 2 次提交
  12. 31 1月, 2018 2 次提交
  13. 30 1月, 2018 1 次提交
  14. 29 1月, 2018 9 次提交
  15. 28 1月, 2018 1 次提交
  16. 26 1月, 2018 2 次提交