One concurrent job issue. Tests #2

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@unlimit
Contributor

unlimit commented Apr 17, 2012

I expected that only one concurrent job will be run if set concurrent = 1, but 2 jobs were run instead!
I added few new test cases for this issue.

+ TwoConcurrentRestrictionJob.total_run_count.should == 4
+ TwoConcurrentRestrictionJob.running_count(TwoConcurrentRestrictionJob.tracking_key).should == 2
+ TwoConcurrentRestrictionJob.restriction_queue(TwoConcurrentRestrictionJob.tracking_key, :normal).size.should == 1
+

This comment has been minimized.

Show comment Hide comment
@wr0ngway

wr0ngway Apr 17, 2012

Owner

May want to stick a Process.waitall at the end of these tests so that the job doesn't keep running past the end of the test. Not sure if Process.waitall will wait on the grandchild (run_resque_queue ends up forking for the job), so double check that

@wr0ngway

wr0ngway Apr 17, 2012

Owner

May want to stick a Process.waitall at the end of these tests so that the job doesn't keep running past the end of the test. Not sure if Process.waitall will wait on the grandchild (run_resque_queue ends up forking for the job), so double check that

This comment has been minimized.

Show comment Hide comment
@unlimit

unlimit Apr 17, 2012

Contributor

I added Process.waitall to the end of test.
Can you please remove this pull request? All changes in the new pull request!

@unlimit

unlimit Apr 17, 2012

Contributor

I added Process.waitall to the end of test.
Can you please remove this pull request? All changes in the new pull request!

@wr0ngway

This comment has been minimized.

Show comment Hide comment
@wr0ngway

wr0ngway Apr 23, 2012

Owner

Merged in test and fixed

Owner

wr0ngway commented Apr 23, 2012

Merged in test and fixed

@wr0ngway wr0ngway closed this Apr 23, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment