diff --git a/codegen-test/src/test/java/com/alibaba/fastjson2/internal/processor/primitives/UtilTypeTest.java b/codegen-test/src/test/java/com/alibaba/fastjson2/internal/processor/primitives/UtilTypeTest.java index 7db2f45ce6..79da47dba0 100644 --- a/codegen-test/src/test/java/com/alibaba/fastjson2/internal/processor/primitives/UtilTypeTest.java +++ b/codegen-test/src/test/java/com/alibaba/fastjson2/internal/processor/primitives/UtilTypeTest.java @@ -2,6 +2,7 @@ import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.annotation.JSONCompiled; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import java.util.*; @@ -9,6 +10,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals; public class UtilTypeTest { + @BeforeAll + static void setUp() { + TimeZone.setDefault(TimeZone.getTimeZone("UTC")); + } + @Test public void test() { Bean bean = new Bean(); diff --git a/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test0/QuickConfigTest.java b/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test0/QuickConfigTest.java index 0acbf332a6..5a7501b607 100644 --- a/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test0/QuickConfigTest.java +++ b/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test0/QuickConfigTest.java @@ -10,7 +10,7 @@ import org.noear.solon.test.SolonTest; import java.util.Date; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; /** @@ -26,7 +26,7 @@ public class QuickConfigTest { public void hello2() throws Throwable { UserDo userDo = new UserDo(); - Map data = new HashMap<>(); + Map data = new LinkedHashMap<>(); data.put("time", new Date(1673861993477L)); data.put("long", 12L); data.put("int", 12); diff --git a/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test1/QuickConfigTest.java b/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test1/QuickConfigTest.java index 67c04db8cc..1254f93dd1 100644 --- a/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test1/QuickConfigTest.java +++ b/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test1/QuickConfigTest.java @@ -10,7 +10,7 @@ import org.noear.solon.test.SolonTest; import java.util.Date; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; /** @@ -26,7 +26,7 @@ public class QuickConfigTest { public void hello2() throws Throwable { UserDo userDo = new UserDo(); - Map data = new HashMap<>(); + Map data = new LinkedHashMap<>(); data.put("time", new Date(1673861993477L)); data.put("long", 12L); data.put("int", 12); diff --git a/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test1/QuickConfigTest2.java b/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test1/QuickConfigTest2.java index 2b878c2b2d..710a38a889 100644 --- a/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test1/QuickConfigTest2.java +++ b/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test1/QuickConfigTest2.java @@ -10,7 +10,7 @@ import org.noear.solon.test.SolonTest; import java.util.Date; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; /** @@ -26,7 +26,7 @@ public class QuickConfigTest2 { public void hello2() throws Throwable { UserDo userDo = new UserDo(); - Map data = new HashMap<>(); + Map data = new LinkedHashMap<>(); data.put("time", new Date(1673861993477L)); data.put("long", 12L); data.put("int", 12); diff --git a/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test2/QuickConfigTest.java b/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test2/QuickConfigTest.java index 7c28a3db68..b73fe13699 100644 --- a/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test2/QuickConfigTest.java +++ b/extension-solon/src/test/java/com/alibaba/fastjson2/support/solon/test/config/test2/QuickConfigTest.java @@ -11,7 +11,6 @@ import org.noear.solon.test.SolonTest; import java.util.Date; -import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; @@ -28,7 +27,7 @@ public class QuickConfigTest { public void hello2() throws Throwable { UserDo userDo = new UserDo(); - Map data = new HashMap<>(); + Map data = new LinkedHashMap<>(); data.put("time", new Date(1673861993477L)); data.put("long", 12L); data.put("int", 12);