Tests fail on the first of the month #465

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

Projects

None yet

3 participants

@sferik
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
Contributor

derp.

@sferik
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
Contributor

@mildmojo and I are working on this.

@cmeiklejohn
Contributor

Closing.

@cmeiklejohn cmeiklejohn closed this Nov 4, 2012
@arthurnn arthurnn pushed a commit that referenced this issue Jan 29, 2015
@mildmojo mildmojo 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.
ad86e15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment