Skip to content

Commit

Permalink
br,test: fix data race for parquet test (pingcap#27482)
Browse files Browse the repository at this point in the history
  • Loading branch information
glorv authored Aug 23, 2021
1 parent f47564d commit 7ddc086
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions pkg/lightning/mydump/parquet_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"io"
"path/filepath"
"strconv"
"time"

. "github.com/pingcap/check"
"github.com/pingcap/tidb/br/pkg/storage"
Expand Down Expand Up @@ -82,13 +81,6 @@ func (s testParquetParserSuite) TestParquetParser(c *C) {
}

func (s testParquetParserSuite) TestParquetVariousTypes(c *C) {
// those deprecated TIME/TIMESTAMP types depend on the local timezone!
prevTZ := time.Local
time.Local = time.FixedZone("UTC+8", 8*60*60)
defer func() {
time.Local = prevTZ
}()

type Test struct {
Date int32 `parquet:"name=date, type=DATE"`
TimeMillis int32 `parquet:"name=timemillis, type=TIME_MILLIS"`
Expand All @@ -114,7 +106,7 @@ func (s testParquetParserSuite) TestParquetVariousTypes(c *C) {

v := &Test{
Date: 18564, // 2020-10-29
TimeMillis: 62775123, // 17:26:15.123 (note all time are in UTC+8!)
TimeMillis: 62775123, // 17:26:15.123
TimeMicros: 62775123456, // 17:26:15.123
TimestampMillis: 1603963672356, // 2020-10-29T09:27:52.356Z
TimestampMicros: 1603963672356956, // 2020-10-29T09:27:52.356956Z
Expand Down

0 comments on commit 7ddc086

Please sign in to comment.