Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Test failures on Travis #334

Closed
sodabrew opened this Issue · 5 comments

2 participants

@sodabrew
Collaborator

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'
@sodabrew sodabrew was assigned
@sodabrew sodabrew referenced this issue from a commit in sodabrew/mysql2
@sodabrew sodabrew These tests should_not raise exceptions issue #334 bbe52ea
@sodabrew
Collaborator

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

@sodabrew
Collaborator

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 dbussink referenced this issue from a commit in dbussink/mysql2
@dbussink dbussink 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
3ac5706
@dbussink
Collaborator

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

@dbussink
Collaborator

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

@sodabrew
Collaborator

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

@sodabrew sodabrew closed this
@justincase justincase referenced this issue from a commit
@dbussink dbussink 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
5534339
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.