Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure when TZ is not Europe/London #1688

Closed
gleide opened this issue Nov 25, 2017 · 4 comments
Closed

Test failure when TZ is not Europe/London #1688

gleide opened this issue Nov 25, 2017 · 4 comments

Comments

@gleide
Copy link

gleide commented Nov 25, 2017

Hello,when I run "bundle exec rake test:db" A failure occured:
Failure:
AmfControllerTest#test_getway_old [/home/yeager/sfw/openstreetmap-website/test/controllers/amf_controller_test.rb:350]:
Expected: 0
Actual: -1
Could you give me some advice on how to sovle that? Thanks!

@tomhughes
Copy link
Member

No sorry I have no idea, and this is a bug tracker not a support forum.

There's no way anybody could tell you from that error message anyway, and it clearly works for us and in our CI builds so it's mostly likely an issue with your configuration that you will need to debug.

@mmd-osm
Copy link
Contributor

mmd-osm commented Dec 1, 2017

BTW: I'm getting the exact same error message, following the official INSTALL.md file on the very latest
1045b40. This is on Ubuntu 16.04.

~/openstreetmap-website$ bundle exec rake test:db
svgo worker: `svgo` not found; please provide proper binary or disable this worker (--no-svgo argument or `:svgo => false` through options)
[Coveralls] Set up the SimpleCov formatter.
[Coveralls] Using SimpleCov's 'rails' settings.
Run options: --seed 8022

# Running:

......................................F

Failure:
AmfControllerTest#test_getway_old [/home/mmd/openstreetmap-website/test/controllers/amf_controller_test.rb:350]:
Expected: 0
  Actual: -1.0


bin/rails test test/controllers/amf_controller_test.rb:334

..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................Puma starting in single mode...
* Version 3.11.0 (ruby 2.3.1-p112), codename: Love Song
* Min threads: 0, max threads: 1
* Environment: development
* Listening on tcp://0.0.0.0:39715
Use Ctrl-C to stop
You're running an old version of PhantomJS, update to >= 2.1.1 for a better experience.
..............................

Finished in 130.343512s, 8.3702 runs/s, 2465.0095 assertions/s.
1091 runs, 321298 assertions, 1 failures, 0 errors, 0 skips
[Coveralls] Outside the CI environment, not sending data.


@mmd-osm
Copy link
Contributor

mmd-osm commented Dec 1, 2017

OK, the test fails, if your server doesn't run in UTC+0 timezone.

Setting the timezone to e.g. timedatectl set-timezone Europe/Berlin reliably makes the test fail. Setting timedatectl set-timezone Etc/UTC makes the error disappear again.

The INSTALL.md has no mention of any timezone requirements, though.

@tomhughes tomhughes reopened this Dec 1, 2017
@tomhughes tomhughes changed the title bundle exec rake test:db Failure Test failure when TZ is not Europe/London Dec 1, 2017
@mmd-osm
Copy link
Contributor

mmd-osm commented Dec 1, 2017

Thanks! Retest looks good here:

~/openstreetmap-website$ timedatectl
      Local time: Fr 2017-12-01 20:29:18 CET
  Universal time: Fr 2017-12-01 19:29:18 UTC
        RTC time: Fr 2017-12-01 20:29:18
       Time zone: Europe/Berlin (CET, +0100)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

~/openstreetmap-website$ bundle exec rake test:db
[...]
Finished in 128.086041s, 8.5177 runs/s, 2508.4701 assertions/s.
1091 runs, 321300 assertions, 0 failures, 0 errors, 0 skips

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants