update batchwrite tests to use utc and time.Equal()

pull/1458/head
Cory LaNou 2015-01-30 13:36:41 -07:00
parent cea1bfb8f6
commit 8e341831ca
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ func init() {
}
func TestBatchWrite_UnmarshalEpoch(t *testing.T) {
now := time.Now()
now := time.Now().UTC()
tests := []struct {
name string
epoch int64
@ -92,7 +92,7 @@ func TestBatchWrite_UnmarshalEpoch(t *testing.T) {
if err != nil {
t.Fatalf("unexpected error. exptected: %v, actual: %v", nil, err)
}
if br.Timestamp != test.expected {
if !br.Timestamp.Equal(test.expected) {
t.Fatalf("Unexpected time. expected: %v, actual: %v", test.expected, br.Timestamp)
}
}