Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Test failures on Travis #334

Closed
sodabrew opened this Issue Nov 16, 2012 · 5 comments

Comments

Projects
None yet
2 participants
Collaborator

sodabrew commented Nov 16, 2012

Travis builds for this repo weren't running the test suite itself until now. Several spec failures are now present:

https://travis-ci.org/brianmario/mysql2/builds/3231281

  • Ruby 1.8.7: No failures, green build.
  • Ruby 1.9.2 and 1.9.3:
198Failures:
199
200  1) Mysql2::Client should not raise an exception on create for a valid encoding
201     Failure/Error: lambda {
202       expected Mysql2::Error but nothing was raised
203     # ./spec/mysql2/client_spec.rb:25:in `block (2 levels) in <top (required)>'
  • Ruby Enterprise Edition:
157  1) Mysql2::Client should raise an exception upon connection failure
158     Failure/Error: lambda {
159       expected Mysql2::Error but nothing was raised
160     # ./spec/mysql2/client_spec.rb:10
  • Rbx 1.8 mode:
  1) Mysql2::Client#query should close the connection when an exception is raised
273     Failure/Error: @client.query("SELECT sleep(2)")
274     SystemStackError:
275       SystemStackError
276     # ./spec/mysql2/client_spec.rb:242:in `__script__'
277     # /home/travis/.rvm/rubies/rbx-head/lib/18/timeout.rb:149:in `timeout'
278     # ./spec/mysql2/client_spec.rb:241:in `__script__'
279     # kernel/common/eval18.rb:45:in `instance_eval'
280     # kernel/bootstrap/array18.rb:18:in `map'
281     # kernel/bootstrap/array18.rb:18:in `map'
282     # kernel/bootstrap/array18.rb:18:in `map'
283     # kernel/loader.rb:696:in `run_at_exits'
284     # kernel/loader.rb:716:in `epilogue'
285     # kernel/loader.rb:854:in `main'
  • Rbx 1.9 mode:
156  1) Mysql2::Result row data type mapping string encoding for ENUM values should use Encoding.default_internal
157     Failure/Error: result['enum_test'].encoding.should eql(Encoding.default_internal)
158       
159       expected: #<Encoding:US-ASCII>
160            got: #<Encoding:UTF-8>
161       
162       (compared using eql?)
163       
164       Diff:
165       @@ -1,2 +1,2 @@
166       -#<Encoding:US-ASCII>
167       +#<Encoding:UTF-8>
168     # ./spec/mysql2/result_spec.rb:322:in `__script__'
169     # kernel/common/eval19.rb:45:in `instance_eval'
170     # kernel/bootstrap/array19.rb:18:in `map'
171     # kernel/bootstrap/array19.rb:18:in `map'
172     # kernel/bootstrap/array19.rb:18:in `map'
173     # kernel/bootstrap/array19.rb:18:in `map'
174     # kernel/loader.rb:696:in `run_at_exits'
175     # kernel/loader.rb:716:in `epilogue'
176     # kernel/loader.rb:854:in `main'

@ghost ghost assigned sodabrew Nov 16, 2012

sodabrew added a commit to sodabrew/mysql2 that referenced this issue Nov 17, 2012

Collaborator

sodabrew commented Nov 17, 2012

Ruby 1.9's are green now. Ree is inconsistent, sometimes green.

Collaborator

sodabrew commented Nov 17, 2012

rbx-18mode:
No idea why this SystemStackError is occurring. Have asked the Rubinius people for help.

rbx-19mode:
It looks like we shouldn't be modifying Encoding.default_internal: http://www.ruby-doc.org/core-1.9.3/Encoding.html#method-c-default_internal

Not sure how to run those tests any other way, though.

dbussink added a commit to dbussink/mysql2 that referenced this issue Nov 17, 2012

Use string keys for test setup
When using symbol keys, this creates non deterministic behavior. It
creates a hash with both a symbol and string key for host, which means
that it depends on hash ordering which hosts it uses.

Since in 1.8 hash ordering is not defined, this creates random errors.

Fixes that sometimes it fails on Rubinius and REE in #334
Collaborator

dbussink commented Nov 17, 2012

The SystemStackError doesn't happen for me here, I guess that is due to fixes in Rubinius that are not available on Travis yet.

Collaborator

dbussink commented Nov 17, 2012

Locally on my machine with latest Rubinius master all tests pass for 1.8 and 1.9 mode

Collaborator

sodabrew commented Nov 19, 2012

Yep, same for me! Closing this now, since we're just waiting on Travis to update their Rubinius.

@sodabrew sodabrew closed this Nov 19, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment