Please review pull request #559: Bug/2.7.x/12844 agent enable doesnt remove old lockfile opened by (cprice-puppet)

Description:

The recent changes to support backwards compatibility with 2.7.10
and 2.7.11 introduced a very minor change in behavior with regards
to when a stale lockfile gets cleaned up. Fixed this test to
recognize the change.

  • Opened: Sat Mar 03 15:51:01 UTC 2012
  • Based on: puppetlabs:2.7rc (a3e0e82070b3e4dece7868e02e1fa9e11212c99c)
  • Requested merge: cprice-puppet:bug/2.7.x/12844-agent-enable-doesnt-remove-old-lockfile (28d5d9b3779e4e77a74091037f72348e7c1e6212)

Diff follows:

diff --git a/test/util/pidlock.rb b/test/util/pidlock.rb
index beaff10..69aeb15 100755
--- a/test/util/pidlock.rb
+++ b/test/util/pidlock.rb
@@ -91,12 +91,11 @@ def test_30_stale_lock
     assert l.locked?
     assert l.mine?
 
-    # unlock should fail, and should *not* molest the existing lockfile,
-    # despite it being stale
+    # unlock should fail, but should clear the stale lockfile.
     File.open(l.lockfile, 'w') { |fd| fd.write(childpid) }
     assert File.exists?(l.lockfile)
     assert !l.unlock
-    assert File.exists?(l.lockfile)
+    assert !File.exists?(l.lockfile)
   end
 
   def test_40_not_locked_at_all

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to