Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Found non deterministic and timezone dependent test issue #3158

Closed
Mukta13 opened this issue Nov 13, 2024 · 1 comment
Closed

[BUG] Found non deterministic and timezone dependent test issue #3158

Mukta13 opened this issue Nov 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Mukta13
Copy link
Contributor

Mukta13 commented Nov 13, 2024

Problem Description

The following files contain non-deterministic tests:

  • MapTest.java
  • DateTypeTest.java

The specific flaky tests in these files are:

  • test1(), test1(), and test2() in MapTest.java
  • test() in DateTypeTest.java (timezone-dependent issue)

Environment Info

  • OS: Ubuntu 22.04.5 LTS, Release: 22.04
  • JDK: java-17-openjdk-amd64
  • Version: Latest version

Steps to Reproduce

Run the following commands for each identified flaky test to observe non-deterministic failures:

  1. For MapTest.java:

`mvn -pl codegen-test edu.illinois:nondex-maven-plugin:2.1.7
-Dtest=com.alibaba.fastjson2.internal.processor.annotation.MapTest#test

mvn -pl codegen-test edu.illinois:nondex-maven-plugin:2.1.7
-Dtest=com.alibaba.fastjson2.internal.processor.annotation.MapTest#test1

mvn -pl codegen-test edu.illinois:nondex-maven-plugin:2.1.7
-Dtest=com.alibaba.fastjson2.internal.processor.annotation.MapTest#test2 `

  1. For DateTypeTest.java:

mvn -pl codegen-test edu.illinois:nondex-maven-plugin:2.1.7 -Dtest=com.alibaba.fastjson2.internal.processor.primitives.DateTypeTest#test

Observed Results

The following non-deterministic errors were observed during test runs:

  1. MapTest.java: [ERROR] MapTest.test2:62 expected: <{"values":{"a":"101","b":"201"}}> but was: <{"values":{"b":"201","a":"101"}}> [ERROR] MapTest.test1: expected: <{"values":{"a":"101","b":"201"}}> but was: <{"values":{"b":"201","a":"101"}}>

  2. DateTypeTest.java (timezone-dependent): [ERROR] DateTypeTest.test:31 expected: <9729000> but was: <96129000>

Expected Results

All tests should pass consistently without non-deterministic failures, and the build should succeed after running the above commands.

@Mukta13 Mukta13 added the bug Something isn't working label Nov 13, 2024
@Mukta13
Copy link
Contributor Author

Mukta13 commented Nov 13, 2024

Fix in #3159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant