diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-11-14 21:05:14 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-11-14 21:05:14 +0000 |
commit | b615dd35ac805176cd1284145b0c0a75f2ce5554 (patch) | |
tree | 1ea71d94838dbd6a7a22059f7963b173939e2e66 | |
parent | 41327689fb727843de258ec99145b78631f821a6 (diff) | |
download | cmogstored-b615dd35ac805176cd1284145b0c0a75f2ce5554.tar.gz |
This test failed badly on multi-core machines.
-rw-r--r-- | test/mgmt.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/mgmt.rb b/test/mgmt.rb index 5c0807c..f224068 100644 --- a/test/mgmt.rb +++ b/test/mgmt.rb @@ -276,13 +276,13 @@ class TestMgmt < Test::Unit::TestCase assert_match(%r{ERROR: unknown command}, @client.gets) taskdir = "/proc/#@pid/task" glob = "#{taskdir}/*" + nr_threads = Dir[glob].size if File.directory?(taskdir) @client.write "server aio_threads = 1\r\n" assert_equal "\r\n", @client.gets if RUBY_PLATFORM =~ /linux/ assert File.directory?(taskdir), "/proc not mounted on Linux?" end if File.directory?(taskdir) - nr_threads = Dir[glob].size while nr_threads == Dir[glob].size && (tries -= 1) > 0 sleep(0.1) end |