From 664546c208c406bba08b8eda2e6a600154d7232e Mon Sep 17 00:00:00 2001 From: Cristian Bica Date: Tue, 5 Aug 2014 09:05:14 +0300 Subject: Integration testing --- test/support/integration/adapters/queue_classic.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/support/integration/adapters/queue_classic.rb (limited to 'test/support/integration/adapters/queue_classic.rb') diff --git a/test/support/integration/adapters/queue_classic.rb b/test/support/integration/adapters/queue_classic.rb new file mode 100644 index 0000000000..3b24eca5b9 --- /dev/null +++ b/test/support/integration/adapters/queue_classic.rb @@ -0,0 +1,21 @@ +module QC; WAIT_TIME = 0.5; end + +module QueueClassicJobsManager + def clear_jobs + # disabling this as it locks + # QC::Queue.new("active_jobs_default").delete_all + end + + def start_workers + @pid = fork do + QC::Conn.connection = QC::Conn.connect + worker = QC::Worker.new(q_name: 'active_jobs_default') + worker.start + end + end + + def stop_workers + Process.kill 'HUP', @pid + end +end + -- cgit v1.2.3