Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial pass at a queue for locks #28

Merged
merged 5 commits into from
Jan 9, 2015
Merged

Initial pass at a queue for locks #28

merged 5 commits into from
Jan 9, 2015

Conversation

esigler
Copy link
Owner

@esigler esigler commented Jan 9, 2015

Here we go!

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.12%) when pulling a0317ae on add-queue into 5d3b102 on master.

it 'does not unlock a label when someone else locked it' do
send_command('locker resource create foobar')
send_command('locker label create bazbat')
send_command('locker label add foobar to bazbat')
send_command('lock bazbat', as: alice)
send_command('unlock bazbat', as: bob)
expect(replies.last).to eq('(failed) bazbat is locked by Alice (@alice)')
expect(replies.last).to eq('(failed) bazbat is locked by Alice (@alice), you have been added ' \
'to the queue, type \'locker dequeue bazbat\' to be removed')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This messaging seems odd: bob attempting to unlock a label he doesn't own shouldn't add him to the queue.

@esigler
Copy link
Owner Author

esigler commented Jan 9, 2015

@dougbarth Updated based on feedback, yeah the unlock was a weird case that should have been the other way.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.12%) when pulling 666b5d7 on add-queue into 5d3b102 on master.

esigler added a commit that referenced this pull request Jan 9, 2015
Initial pass at a queue for locks
@esigler esigler merged commit 6eb11f6 into master Jan 9, 2015
@esigler esigler deleted the add-queue branch January 13, 2015 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants