Skip to content

Commit 066e268

Browse files
committed
fix test suite
1 parent 662436c commit 066e268

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

helper/converter_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ func TestToJson(t *testing.T) {
134134
}
135135

136136
func TestToJsonWithRegex(t *testing.T) {
137+
// SortMapKeys will cause performance losses, only enabled during test
138+
jsonEncoder = sonic.ConfigStd
139+
// use same time zone to ensure RedisObject.Expiration has same json value
140+
var cstZone = time.FixedZone("CST", 8*3600)
141+
time.Local = cstZone
142+
137143
err := os.MkdirAll("tmp", os.ModePerm)
138144
if err != nil {
139145
return

0 commit comments

Comments
 (0)