-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Unit tests appear to be broken - recent merge? #523
Comments
@stleary the changes made here https://github.com/viveksacademia4git/JSON-java/blob/master/.github/workflows/maven.yml provides an interface like this: https://github.com/viveksacademia4git/JSON-java/actions/runs/123544252 For every PR, it's automated and we can confirm if test cases are failing before merging them. I think taking the changes from @viveksacademia4git would be a good idea for PR requests going forward. |
Hello @stleary and @johnjaylward, I was just going through this issue and I discovered a strange phenomenon, and I guess this issue is focusing on that. But upon executing the tests from Eclipse, be it JUnit-Test or Coverage, the total number of unit-tests executed is exactly double i.e. 630. Upon placing the debug point on one of the 2 failing tests, on JSONObjectTest.java#L3004, I encountered that the respective test is executing twice and there are 2 instances of objects within the JSONObject (which I understand why), which is forcing the test to fail. I find the execution of all the tests twice very strange. |
yeah, the main issue there I believe is due to the way we configure the tests. When run from the command line, all the tests are only run once. When run in eclipse, it runs the tests twice within the same process scope, so those 2 singleton tests fail as they expect to be only called once. I believe deleting the "TestRunner.java" file would correct it, but I haven't verified that. |
ok, deleting both |
It works everywhere now! |
confirmed. |
I had an issue with gradle command, but everything works fine after making few changes. Please check the commit viveksacademia4git/JSON-java -> commit-2fc1934
|
I cherry picked your changes and was able to use the gradle wrapper, but I don't think the changes to the |
Oh Nice! |
Reopen so that all pending issues can be tracked. |
Top priority - get the unit tests working again. Needs to be working by EOD 6/3/2020
Unit tests now working for gradle 6.3 with Java 1.8, and maven 3.2.3 with Java 1.8.
Before any more PRs can be accepted:
The text was updated successfully, but these errors were encountered: