spec/lib/appsignal/transaction_spec.rb in appsignal-1.2.1 vs spec/lib/appsignal/transaction_spec.rb in appsignal-1.2.2
- old
+ new
@@ -267,9 +267,19 @@
it "should not set the queue start in extension when value is nil" do
transaction.ext.should_not_receive(:set_queue_start)
transaction.set_queue_start(nil)
end
+
+ it "should not raise an error when the queue start is too big" do
+ transaction.ext.should_receive(:set_queue_start).and_raise(RangeError)
+
+ Appsignal.logger.should_receive(:warn).with("Queue start value 10 is too big")
+
+ lambda {
+ transaction.set_queue_start(10)
+ }.should_not raise_error
+ end
end
describe "#set_http_or_background_queue_start" do
context "for a http transaction" do
let(:namespace) { Appsignal::Transaction::HTTP_REQUEST }