Skip to content

Commit b06bcc7

Browse files
committed
remove duplicate tests
1 parent 4b8920f commit b06bcc7

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

test/worker_test.rb

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -450,19 +450,6 @@ def self.perform
450450
assert $BEFORE_FORK_CALLED == workerA.will_fork?
451451
end
452452

453-
it "Will not call a before_fork hook when the worker can't fork" do
454-
Resque.redis.flushall
455-
$BEFORE_FORK_CALLED = false
456-
Resque.before_fork = Proc.new { $BEFORE_FORK_CALLED = true }
457-
workerA = Resque::Worker.new(:jobs)
458-
workerA.cant_fork = true
459-
460-
assert !$BEFORE_FORK_CALLED, "before_fork should not have been called before job runs"
461-
Resque::Job.create(:jobs, SomeJob, 20, '/tmp')
462-
workerA.work(0)
463-
assert !$BEFORE_FORK_CALLED, "before_fork should not have been called after job runs"
464-
end
465-
466453
it "Will not call a before_fork hook when the worker can't fork" do
467454
Resque.redis.flushall
468455
$BEFORE_FORK_CALLED = false
@@ -580,19 +567,6 @@ def self.perform
580567
assert !$AFTER_FORK_CALLED
581568
end
582569

583-
it "Will not call an after_fork hook when the worker can't fork" do
584-
Resque.redis.flushall
585-
$AFTER_FORK_CALLED = false
586-
Resque.after_fork = Proc.new { $AFTER_FORK_CALLED = true }
587-
workerA = Resque::Worker.new(:jobs)
588-
workerA.cant_fork = true
589-
590-
assert !$AFTER_FORK_CALLED
591-
Resque::Job.create(:jobs, SomeJob, 20, '/tmp')
592-
workerA.work(0)
593-
assert !$AFTER_FORK_CALLED
594-
end
595-
596570
it "returns PID of running process" do
597571
assert_equal @worker.to_s.split(":")[1].to_i, @worker.pid
598572
end

0 commit comments

Comments
 (0)