From 400106ba3ae92b2b78b4d2afe5e8cdb9d0d4b1c3 Mon Sep 17 00:00:00 2001 From: Viktor Erlingsson Date: Wed, 19 Jun 2024 17:21:06 +0200 Subject: [PATCH] update spec to use amqp server --- spec/storage_spec.cr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/storage_spec.cr b/spec/storage_spec.cr index d393969ec4..561adc1be2 100644 --- a/spec/storage_spec.cr +++ b/spec/storage_spec.cr @@ -101,8 +101,9 @@ describe LavinMQ::DurableQueue do it "handles files with few extra bytes" do queue_name = Random::Secure.hex(10) - with_vhost("test_vhost") do |vhost| - with_channel(vhost: vhost.name) do |ch| + with_amqp_server do |s| + vhost = s.vhosts.create("test_vhost") + with_channel(s, vhost: vhost.name) do |ch| q = ch.queue(queue_name) queue = vhost.queues[queue_name].as(LavinMQ::DurableQueue) mfile = queue.@msg_store.@segments.first_value