Sha256: a3acc4950a1d4c66f28fc7cdb91a201b3a665b897b2957827f0df9f7ad106bd3

Contents?: true

Size: 767 Bytes

Versions: 2

Compression:

Stored size: 767 Bytes

Contents

require "spec_helper"
require 'benchmark'


describe "shoot 1k emails!" do
  let!(:envelope_a) { build(:envelope_multi_1k) }
  it "sends http request for Sendgrid web API" do
    VCR.use_cassette('mailcannon_integration_1k') do
      Sidekiq::Testing.inline! do
        bm = Benchmark.measure do
          envelope_a.post!
        end
        puts "1k test real time: #{bm.real}"
        expect(envelope_a.reload.processed?).to be_true

        # Travis has been showing unstable performance, not feasible to include performance tests.
        # The performance varies from machine to machine, specially when using dedicated servers for each service.
        if ENV['PERFORMANCE_TEST']
          expect(bm.real<0.2).to be_true
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mailcannon-0.1.0.pre.1 spec/integration/1k_spec.rb
mailcannon-0.0.8.pre.1 spec/integration/1k_spec.rb