Closed GoogleCodeExporter closed 9 years ago
Sorry for that.
I used to Redmine before GoogleCode... :(
I'm afraid to change your code alone :)
Original comment by Alexey.Chebotar@gmail.com
on 20 Mar 2009 at 12:16
Please see full log in attach.
Original comment by Alexey.Chebotar@gmail.com
on 20 Mar 2009 at 1:39
Attachments:
Maybe, I've fixed it in trunk.
Original comment by kou...@gmail.com
on 20 Mar 2009 at 2:38
Thanks. I will make tests of this, after completing tests on ruby 1.8.7 p27 :)
Original comment by Alexey.Chebotar@gmail.com
on 20 Mar 2009 at 3:10
Results of tests on Ruby 1.8.7 p72:
---
Finished in 2646.78688 seconds.
1) Omission: requires permission for searching by 'uid' to anonymous user.
test_bind(TestConnectionPerDN)
./test/test_connection_per_dn.rb:59:in `test_bind'
/root/ruby-activeldap-ro/test/al-test-utils.rb:270:in `make_temporary_user'
/root/ruby-activeldap-ro/test/al-test-utils.rb:249:in `make_temporary_user'
/root/ruby-activeldap-ro/test/al-test-utils.rb:296:in `ensure_delete_user'
/root/ruby-activeldap-ro/test/al-test-utils.rb:244:in `make_temporary_user'
./test/test_connection_per_dn.rb:38:in `test_bind'
185 tests, 492 assertions, 0 failures, 0 errors, 0 pendings, 1 omissions, 0
notifications
---
Why only 185 tests ? :]
Original comment by Alexey.Chebotar@gmail.com
on 20 Mar 2009 at 4:22
I've fixed "Undefined method 'lines' for String" in trunk. I hope this not a
problem? :)
I've tested this code on Ruby 1.8.6 and 1.8.7 in irb:
---irb(main):001:0> RUBY_VERSION
=> "1.8.6"
irb(main):002:0> if "".respond_to?(:lines)
irb(main):003:1> def string_to_lines(string)
irb(main):004:2> string.lines.to_a
irb(main):005:2> end
irb(main):006:1> else
irb(main):007:1* def string_to_lines(string)
irb(main):008:2> ary = []
irb(main):009:2> string.each_line{|l| ary << l}
irb(main):010:2> ary
irb(main):011:2> end
irb(main):012:1> end
=> nil
irb(main):013:0> string_to_lines("a\n\nb\n")
=> ["a\n", "\n", "b\n"]
irb(main):014:0> string_to_lines("a\n\nb\n").size
=> 3
---
irb(main):001:0> RUBY_VERSION
=> "1.8.7"
irb(main):002:0> if "".respond_to?(:lines)
irb(main):003:1> def string_to_lines(string)
irb(main):004:2> string.lines.to_a
irb(main):005:2> end
irb(main):006:1> else
irb(main):007:1* def string_to_lines(string)
irb(main):008:2> ary = []
irb(main):009:2> string.each_line{|l| ary << l}
irb(main):010:2> ary
irb(main):011:2> end
irb(main):012:1> end
=> nil
irb(main):013:0> string_to_lines("a\n\nb\n")
=> ["a\n", "\n", "b\n"]
irb(main):014:0> string_to_lines("a\n\nb\n").size
=> 3
---
All tests are passed.
Logs of tests attached
Original comment by Alexey.Chebotar@gmail.com
on 20 Mar 2009 at 10:02
Attachments:
Tests are passed on ruby 1.9.1 p0
But I don't understand why always different count of tests? :-\
Original comment by Alexey.Chebotar@gmail.com
on 21 Mar 2009 at 12:18
Attachments:
Thanks for fixing it.
It's the reason "why always different count of tests" that test/run-test.rb add
--priority-mode option implicitly. (Oops, I didn't write documents for
--priority-mode in Test::Unit 2.x documents... I hope that someone helps me to
write
Test::Unit 2.x documents in English...) In the mode, ran tests are selected
stochastically and test priority and "whether a test is failed in the previous
test"
are used on selecting tests. (You will find "priority :must" and "priority
normal" in
test codes.)
ActiveLdap test suits are takes long time. It blocks quick "write test" - "run
test"
- "write code" - "run test" - ... cycle. So, ActiveLdap runs only selected
tests by
default. You can run all test with the following tests:
% test/run-test.rb --no-priority-mode
Original comment by kou...@gmail.com
on 21 Mar 2009 at 1:28
Maybe I will help you with documents in future, but my English not so great...
I will
learn it stronger :)
I need to study code of libraries Ruby/LDAP and Ruby/ActiveLdap before writing
documents (in Russian and English) ;)
I will check tests on all versions of Ruby, with "--no-priority-mode" option.
Original comment by Alexey.Chebotar@gmail.com
on 21 Mar 2009 at 11:07
Wow! Very thanks!
You're a very active developer!!!
Original comment by kou...@gmail.com
on 21 Mar 2009 at 3:51
Fanatical mode: On :)
All tests are passed :)
On ruby 1.8.6 p287:
---
Finished in 2670.720477 seconds.
312 tests, 875 assertions, 0 failures, 0 errors, 0 pendings, 1 omissions, 0
notifications
---
On Ruby 1.8.7 p27:
---
Finished in 2656.195123 seconds.
312 tests, 875 assertions, 0 failures, 0 errors, 0 pendings, 1 omissions, 0
notifications
---
On Ruby 1.9.1 p0:
---
Finished in 3404.351493375 seconds.
312 tests, 875 assertions, 0 failures, 0 errors, 0 pendings, 1 omissions, 0
notifications
---
Strange time... :-\
Original comment by Alexey.Chebotar@gmail.com
on 21 Mar 2009 at 6:01
Umm, the performance issue should be treated separate issue.
There is a benchmark script:
% cp benchmark/config.yaml{.sample,}
% vim benchmark/config.yaml
% ruby benchmark/bench-al.rb --config benchmark/config.yaml
Original comment by kou...@gmail.com
on 22 Mar 2009 at 1:37
Original issue reported on code.google.com by
Alexey.Chebotar@gmail.com
on 20 Mar 2009 at 11:57Attachments: