Skip to content

Commit

Permalink
Fix tests with wrong time offset calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Nov 8, 2017
1 parent 1b57d65 commit a1498f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ Current

### Fixed:

- [Fix tests with wrong time offset calculation](https://github.com/yahoo/fili/pull/567)
* Time-checking based tests setup time offset in a wrong way. `timeZoneId.getOffset` is fixed to take the right
argument.

- [Handle Number Format errors from empty or missing cardinality value](https://github.com/yahoo/fili/issues/549)

- [Fix lucene search provider replace method](https://github.com/yahoo/fili/pull/551)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.yahoo.bard.webservice.data.dimension.impl.ScanSearchProviderManager

import org.apache.avro.generic.GenericRecord

import spock.lang.Ignore
import spock.lang.Specification

import java.util.function.Consumer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ class DefaultSqlBackedClientSpec extends Specification {
setup:
def timeZoneId = DateTimeZone.forID(timeZone)
// shift the start and end dates by the offset from utc time
def start = new DateTime(START).plusMillis(-timeZoneId.getOffset(new DateTime(DateTimeZone.UTC))).toString()
def end = new DateTime(END).plusMillis(-timeZoneId.getOffset(new DateTime(DateTimeZone.UTC))).toString()
def raw = new DateTime(START)
def start = new DateTime(START).plusMillis(-timeZoneId.getOffset(raw)).toString()
def end = new DateTime(END).plusMillis(-timeZoneId.getOffset(raw)).toString()

TimeSeriesQuery timeSeriesQuery = new TimeSeriesQuery(
dataSource(WIKITICKER, DAY, timeZoneId, [ADDED], [], "", ""),
Expand Down

0 comments on commit a1498f1

Please sign in to comment.