From 8ceb258cdf8b30a56a2645be805ec62e8d1f4831 Mon Sep 17 00:00:00 2001 From: ti-srebot <66930949+ti-srebot@users.noreply.github.com> Date: Mon, 23 Aug 2021 23:14:04 +0800 Subject: [PATCH] br,test: fix data race for parquet test (#27482) (#27516) --- br/pkg/lightning/mydump/parquet_parser_test.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/br/pkg/lightning/mydump/parquet_parser_test.go b/br/pkg/lightning/mydump/parquet_parser_test.go index 9c68f80c0d2ae..41fea53a79068 100644 --- a/br/pkg/lightning/mydump/parquet_parser_test.go +++ b/br/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