I ran 50 runs and got the following once. Look like what you're talking about?

  1) Error:
testErraticBehavior(ErraticRestTest):
RuntimeError: HACK[A822]
    rexml_bug.rb:15:in `testErraticBehavior'
    rexml_bug.rb:22:in `testErraticBehavior'


On 7/10/06, Charles O Nutter <[EMAIL PROTECTED]> wrote:
Delicious, delicious test cases. It shall be solved!


On 7/10/06, David Corbin < [EMAIL PROTECTED]> wrote:
Well, I've got a pseudo test case for this.  On my system, with JRuby 0.9.0
(well, technically it's HEAD from SourceForge), this fails on about 4 out of
5 executions.  Of course, it fails differently each time.

It has yet to fail in 68 executions with C Ruby.

I encourage anyone that wants to look at this, to write a shell script that
just runs it repeatedly.

David

---cut---
require 'rexml/document'
require 'test/unit'
class ErraticRestTest < Test::Unit::TestCase

  TEST_XML = <<-EOF
  <?xml version='1.0'?><sites >
  <site code='333' href='' />
  </sites>
EOF


  def testErraticBehavior
    1000.times{|count|
       document = REXML::Document.new(TEST_XML)
       raise "HACK[A#{count}]" if 1 !=
document.get_elements('/sites/[EMAIL PROTECTED]').size
       begin
         raise "HACK[C#{count}"
if !REXML::XPath.match(document, '/sites/[EMAIL PROTECTED]/@href')
       rescue => e
          p e
          raise "HACK[B#{count}]"
       end
    }
  end
end
---end---


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel



--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ www.jruby.org
Application Architect @ www.ventera.com



--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ www.jruby.org
Application Architect @ www.ventera.com
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to