summaryrefslogtreecommitdiffstats
path: root/test/server
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-25 06:24:44 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-25 06:24:44 +0000
commit4cd30194f18cdb792bc551080b95c0a6ce400de5 (patch)
tree8f3a38af03b0980b70e988d52c46088dd77165a1 /test/server
parent45a9edbe23c43b5e1c8e2c6683502a6a6ef54661 (diff)
Did some work on making sure object removal actually works, thus stopping some potential memory leaks. Also explicitly removed objects in more places, again hopefully forestalling memory leaks.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1224 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/server')
-rw-r--r--test/server/bucket.rb11
-rw-r--r--test/server/pelement.rb2
2 files changed, 9 insertions, 4 deletions
diff --git a/test/server/bucket.rb b/test/server/bucket.rb
index e9e13797d..3169781f8 100644
--- a/test/server/bucket.rb
+++ b/test/server/bucket.rb
@@ -22,9 +22,11 @@ class TestBucket < Test::Unit::TestCase
@num = 1
end
- Puppet.err "#{Process.pid}: %s: %s" % [@num, memory()]
+ #Puppet.err "#{Process.pid}: %s: %s" % [@num, memory()]
GC.start
+ #gcdebug(String)
end
+
# run through all of the files and exercise the filebucket methods
def checkfiles(client)
files = filelist()
@@ -66,6 +68,9 @@ class TestBucket < Test::Unit::TestCase
assert(tsum == osum)
# modify our tmp file
+ unless FileTest.writable?(tmppath)
+ File.chmod(0644, tmppath)
+ end
File.open(tmppath,File::WRONLY|File::TRUNC) { |wf|
wf.print "This is some test text\n"
}
@@ -109,7 +114,7 @@ class TestBucket < Test::Unit::TestCase
end
%w{
- who bash vim sh uname /etc/passwd /etc/syslog.conf /etc/hosts
+ who bash sh uname /etc/passwd /etc/syslog.conf /etc/hosts
}.each { |file|
# if it's fully qualified, just add it
if file =~ /^\//
@@ -234,7 +239,7 @@ class TestBucket < Test::Unit::TestCase
unless pid
raise "Uh, we don't have a child pid"
end
- system("kill %s" % pid)
+ Process.kill("TERM", pid)
end
end
diff --git a/test/server/pelement.rb b/test/server/pelement.rb
index 1a6458768..7bff1cb26 100644
--- a/test/server/pelement.rb
+++ b/test/server/pelement.rb
@@ -196,7 +196,7 @@ class TestPElementServer < Test::Unit::TestCase
Puppet.warning "%s does not respond to :list" % type.name
next
end
- #next unless type.name == :port
+ next unless type.name == :package
Puppet.info "Describing each %s" % type.name
# First do a listing from the server