3-1-stable: AR XML serialization tests broken for anyone else?

Hi all, I’m preparing a pull request for 3-1-stable, but I’m getting test failures in the XML serialization tests (running just AR tests for postgresql). I looked on Travis, but I can’t see that we have builds for release branches. If they are there, please advise how to find those.

I haven’t dug into the cause yet to see if it’s complicated or obvious, but here are the 6 failures I’m seeing…

  1. Failure:
    test_should_serialize_binary(NilXmlSerializationTest) [/Users/FileVault/stevej/Projects/rails/activerecord/test/cases/xml_serialization_test.rb:124]:
    Failed assertion, no message given.

  2. Failure:
    test_should_serialize_boolean(NilXmlSerializationTest) [/Users/FileVault/stevej/Projects/rails/activerecord/test/cases/xml_serialization_test.rb:139]:
    Failed assertion, no message given.

  3. Failure:
    test_should_serialize_datetime(NilXmlSerializationTest) [/Users/FileVault/stevej/Projects/rails/activerecord/test/cases/xml_serialization_test.rb:132]:
    Failed assertion, no message given.

  4. Failure:
    test_should_serialize_integer(NilXmlSerializationTest) [/Users/FileVault/stevej/Projects/rails/activerecord/test/cases/xml_serialization_test.rb:117]:
    Failed assertion, no message given.

  5. Failure:
    test_should_serialize_string(NilXmlSerializationTest) [/Users/FileVault/stevej/Projects/rails/activerecord/test/cases/xml_serialization_test.rb:113]:
    Expected /</name>/ to match “<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n <name nil=“true”/>\n <age type=“integer” nil=“true”/>\n <avatar type=“binary” nil=“true” encoding=“base64”/>\n <created-at type=“datetime” nil=“true”/>\n <awesome type=“boolean” nil=“true”/>\n <preferences nil=“true”/>\n\n”.

  6. Failure:
    test_should_serialize_yaml(NilXmlSerializationTest) [/Users/FileVault/stevej/Projects/rails/activerecord/test/cases/xml_serialization_test.rb:146]:
    Expected /<preferences nil=“true”></preferences>/ to match “<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n <name nil=“true”/>\n <age type=“integer” nil=“true”/>\n <avatar type=“binary” nil=“true” encoding=“base64”/>\n <created-at type=“datetime” nil=“true”/>\n <awesome type=“boolean” nil=“true”/>\n <preferences nil=“true”/>\n\n”.

3-1 isn't getting any non-security related bug fixes these days.

Oh – good to know. If I submit a trivial non-security pull request, is it likely to be accepted?

If you submit a PR against 3.1 with the sole purpose of fixing broken
tests, I'll happily merge. We'll need those tests to work if/when there
are future security patches to apply anyway.

Security patch should not be sent in the issues tracker. Read this page if you think your bug is a security one http://rubyonrails.org/security

Rafael Mendonça França

http://twitter.com/rafaelfranca
https://github.com/rafaelfranca

I had been wanting to back-port a PostgreSQL auto-reconnect fix. Since that’s not a security issue though, I guess it’s not appropriate for Rails 3.1. I have written a trivial initializer for my employer that patches the problem in 3.1, so I’ll just ask permission to publish that as a Gist for anyone who needs it.

I’ll probably still go ahead and fix the build if no one beats (or has beaten) me to it.