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

Tests fail on the first of the month #465

Closed
sferik opened this Issue Oct 1, 2012 · 4 comments

Comments

Projects
None yet
3 participants
@sferik
Copy link
Member

sferik commented Oct 1, 2012

This test fails on the first of the month:

test: Download should find counts per day for versions in range. (DownloadTest):
ActiveRecord::StatementInvalid: PG::Error: ERROR:  date/time field value out of range: "2012-09-31"

https://travis-ci.org/rubygems/rubygems.org/jobs/2624114

@cmeiklejohn

This comment has been minimized.

Copy link
Contributor

cmeiklejohn commented Oct 1, 2012

derp.

@sferik

This comment has been minimized.

Copy link
Member

sferik commented Oct 1, 2012

Upon further investigation, this appears to be an actual bug in Download.counts_by_day_for_version_in_date_range, not just a bug in the tests. 😩

@jaredonline

This comment has been minimized.

Copy link
Contributor

jaredonline commented Nov 4, 2012

@mildmojo and I are working on this.

@cmeiklejohn

This comment has been minimized.

Copy link
Contributor

cmeiklejohn commented Nov 4, 2012

Closing.

@cmeiklejohn cmeiklejohn closed this Nov 4, 2012

arthurnn pushed a commit that referenced this issue Jan 29, 2015

Fixes download test for count/day over month boundary.
The download_test.rb test for getting counts by day for a date range
was calling the method with strings instead of date objects. Actual
code uses dates. Changed the test to use dates so date arithmetic
is reliable. Fixed with @jaredonline. Issue #465.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment