Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4256

Rspec Tests running very very slow!!!

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None

      my test_environment:
      Rails 4.2.5.2
      Mongoid (5.1.1)
      Mongo (2.1.2)
      Rspec 3

      Rspec tests running very slow(ridiculously slow) i have nearly 12 tests and it takes like 17 minutes to finish.I've tried to resolve this issue myself and I've install 'gem ruby-prof' and found out that 77% of all my time (running 1 test) takes 'sleep' from Mongo::Server#run! (please check attachment)

      Rspec config file:

      Rspec.concfigure do |config|
      config.before(:each) do
      DatabaseCleaner.start
      Mongoid::Clients.default.collection.select

      {|c| c.name !~/system/ }

      .each(&:drop)
      end
      end

            Assignee:
            Unassigned Unassigned
            Reporter:
            violentr Deniss
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: