From 7ddc08690a428e1666e20c6175aae095d9b0b0a7 Mon Sep 17 00:00:00 2001 From: glorv Date: Mon, 23 Aug 2021 20:32:03 +0800 Subject: [PATCH] br,test: fix data race for parquet test (#27482) --- pkg/lightning/mydump/parquet_parser_test.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pkg/lightning/mydump/parquet_parser_test.go b/pkg/lightning/mydump/parquet_parser_test.go index 9c68f80c0d2ae..41fea53a79068 100644 --- a/pkg/lightning/mydump/parquet_parser_test.go +++ b/pkg/lightning/mydump/parquet_parser_test.go @@ -5,7 +5,6 @@ import ( "io" "path/filepath" "strconv" - "time" . "github.com/pingcap/check" "github.com/pingcap/tidb/br/pkg/storage" @@ -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"` @@ -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